All Projects → czkm → egret-farm

czkm / egret-farm

Licence: other
🎮 基于egret引擎开发的 h5农场游戏

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to egret-farm

Python-Games
A collection of small python games made by me using pygame and tkinter libraries
Stars: ✭ 121 (+303.33%)
Mutual labels:  game-2d
Squid
C# Realtime GUI System
Stars: ✭ 80 (+166.67%)
Mutual labels:  game-2d
go-four-in-a-row
A simple command-line implementation of the game `four in the row`
Stars: ✭ 12 (-60%)
Mutual labels:  game-2d
HitboxBuilder-2D
Building hitboxes has never been easier
Stars: ✭ 21 (-30%)
Mutual labels:  game-2d
badassquest
RPG / GTA-style game engine built on top of Google Maps Javascript APIs
Stars: ✭ 26 (-13.33%)
Mutual labels:  game-2d
Zilon Roguelike
Survival roguelike game with huge world generation.
Stars: ✭ 18 (-40%)
Mutual labels:  game-2d
Frag
A cross-platform 2D|3D game framework for the Nim programming language
Stars: ✭ 210 (+600%)
Mutual labels:  game-2d
egret-game
egret 连连看小游戏
Stars: ✭ 26 (-13.33%)
Mutual labels:  egret
defender-game
A super basic 2D game written in Rust
Stars: ✭ 22 (-26.67%)
Mutual labels:  game-2d
snake-game-2D
The famous 2D snake game in which your goal is to eat until you get huge and accumulate many points.
Stars: ✭ 18 (-40%)
Mutual labels:  game-2d
D5Power
H5 APP or GAME development library and tools
Stars: ✭ 47 (+56.67%)
Mutual labels:  egret
coloniae
Economic strategy game in web broswer
Stars: ✭ 34 (+13.33%)
Mutual labels:  game-2d
Halma
Halma Game Built With The Awesome libGDX framework
Stars: ✭ 20 (-33.33%)
Mutual labels:  game-2d
Koru
A 2D multiplayer sandbox game.
Stars: ✭ 78 (+160%)
Mutual labels:  game-2d
uncharted-waters-2
Browser-based remake of Uncharted Waters: New Horizons (大航海時代II)
Stars: ✭ 56 (+86.67%)
Mutual labels:  game-2d
hacker-feud
💥 A single page web game made with Svelte.
Stars: ✭ 61 (+103.33%)
Mutual labels:  game-2d
egret-docs
Egret Document
Stars: ✭ 113 (+276.67%)
Mutual labels:  egret
Game-Assets-And-Resources
Free and paid game assets and game resources for 2D games, 3D games, mobile games, Steam games, Unity games, and other games.
Stars: ✭ 164 (+446.67%)
Mutual labels:  game-2d
AsLib
🎨: RPG map maker (paint tool)
Stars: ✭ 82 (+173.33%)
Mutual labels:  game-2d
tic-tac-toe
🕹 iOS game - classic Tic Tac Toe with AI and state machines [Swift + SpriteKit + GameplayKit].
Stars: ✭ 60 (+100%)
Mutual labels:  game-2d

egret-farm

基于egret引擎开发的 h5农场游戏

仅个人学习使用

农场demo

本项目第一阶段已经基本开发完成,因为暂时没有和后台对接,所以均为前端展示,自己封装了一些http请求方法,可以使用。运行效果如下

  • image
  • image

本项目使用白鹭引擎(egret)开发 使用Typescript ,其中egret引擎已近对项目进行了封装 只需要修改部分的资源即可 image 本项目用到的egret相关程序

  • egretwing为项目编辑文件,继承开发环境,主要在这里相关代码 image
  • TextureMerger 为项目制作帧动画和字体相关操作
  • Egret Launcher egret引擎版本管理
  • ResDepot egret项目采用的资源管理方式

项目结构如下

  • image

创建加载页面 程序初始化loading页面 image 程序主方法入口 image

src下主要文件

  • common 全局组件
    • GameUtil 全局共用方法 封装获取舞台高度相关
    • GlobeEnum 全局枚举 设置土地,蔬菜,操作等相关状态
    • Https 封装异步请求方法
  • control_anim 浇水施肥等动画控制类
  • Farmland 农场土地类
  • Farmstart 农场基类
  • LoadingUI 自定义loading
  • Main 入口 通过new一个Farmstart来创建初始化场景界面

resource下主要文件

  • image 其中 assets和 eui_skins 下的目录为系统自带的egret相关事件的皮肤 可以给与保留或者删除

  • myskins 自定义皮肤文件夹

    • anim 动画皮肤
    • farm_land 农场土地皮肤
    • farm_start 农场背景图

anim

  • image 定义了一个浇水动画 可以通过control_anim中的Show_option_handle方法中的change_image来调用图标的变化完成浇水,施肥收获等动作 image

farm_land

  • image 定义土地状态 定义了浇水,施肥摇曳和蔬菜收获 2个动画
  • image

其中蔬菜的品种和土地的状态通过Farmland类中的change_Landpic来改变土地状态,通过change_Caipic来改变土地上植株的变化,farm_land_area.text 来显示土地的相关面积

farm_start

  • image 该页面是整个项目的主要ui界面 大多为简单ui其中 有1个提示用户的动画
  • image 相关初始化操作在Farmstart类中调用初始化方法完成
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].