Indigo 开源项目教程

Indigo 开源项目教程

indigoAn FP game engine for Scala.项目地址:https://gitcode.com/gh_mirrors/ind/indigo

1. 项目的目录结构及介绍

Indigo 项目的目录结构如下:

indigo/
├── build.sbt
├── project/
│   ├── build.properties
│   ├── plugins.sbt
├── src/
│   ├── main/
│   │   ├── scala/
│   │   │   ├── indigo/
│   │   │   │   ├── core/
│   │   │   │   ├── effects/
│   │   │   │   ├── events/
│   │   │   │   ├── platform/
│   │   │   │   ├── shared/
│   │   │   │   ├── subsystems/
│   │   │   │   ├── terminal/
│   │   │   │   ├── utils/
│   │   │   │   └── IndigoGame.scala
│   │   ├── resources/
│   │   │   ├── assets/
│   │   │   ├── fonts/
│   │   │   ├── shaders/
│   │   │   └── sounds/
│   ├── test/
│   │   ├── scala/
│   │   │   ├── indigo/
│   │   │   │   ├── core/
│   │   │   │   ├── effects/
│   │   │   │   ├── events/
│   │   │   │   ├── platform/
│   │   │   │   ├── shared/
│   │   │   │   ├── subsystems/
│   │   │   │   ├── terminal/
│   │   │   │   ├── utils/
│   │   │   │   └── IndigoGameSpec.scala
├── README.md
├── LICENSE

目录结构介绍

  • build.sbt: 项目的构建配置文件。
  • project/: 包含项目的构建相关配置文件。
    • build.properties: 指定 SBT 版本。
    • plugins.sbt: 包含项目使用的插件。
  • src/: 源代码目录。
    • main/: 主代码目录。
      • scala/: Scala 代码目录。
        • indigo/: Indigo 核心代码目录。
          • core/: 核心功能模块。
          • effects/: 效果处理模块。
          • events/: 事件处理模块。
          • platform/: 平台相关模块。
          • shared/: 共享模块。
          • subsystems/: 子系统模块。
          • terminal/: 终端模块。
          • utils/: 工具模块。
          • IndigoGame.scala: 主游戏入口文件。
      • resources/: 资源文件目录。
        • assets/: 游戏资产文件。
        • fonts/: 字体文件。
        • shaders/: 着色器文件。
        • sounds/: 声音文件。
    • test/: 测试代码目录。
      • scala/: Scala 测试代码目录。
        • indigo/: Indigo 测试代码目录。
          • core/: 核心功能测试模块。
          • effects/: 效果处理测试模块。
          • events/: 事件处理测试模块。
          • platform/: 平台相关测试模块。
          • shared/: 共享测试模块。
          • subsystems/: 子系统测试模块。
          • terminal/: 终端测试模块。
          • utils/: 工具测试模块。
          • IndigoGameSpec.scala: 主游戏测试入口文件。
  • README.md: 项目说明文档。
  • LICENSE: 项目许可证文件。

2. 项目的启动文件介绍

项目的启动文件是 src/main/scala/indigo/IndigoGame.scala。这个文件定义了游戏的入口点,并包含了初始化游戏和处理游戏循环的逻辑。

package indigo

import indigo.core._
import indigo.events._
import indigo.platform._
import indigo.shared._
import indigo.subsystems._
import indigo.terminal._
import indigo.utils._

object IndigoGame extends IndigoGame {
  def initialScene(bootData: BootData): Option[SceneName] = None

  def scenes(bootData: BootData): Non

indigoAn FP game engine for Scala.项目地址:https://gitcode.com/gh_mirrors/ind/indigo

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

童霆腾Sorrowful

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值