Giter Site home page Giter Site logo

macosunity / leidota Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tieunun/leidota

0.0 2.0 0.0 93.03 MB

使用cocos2d写的一个类似Dota传奇战斗的demo

CMake 3.14% C++ 92.04% C 0.71% Batchfile 0.01% Python 2.55% Java 0.90% Makefile 0.64%

leidota's Introduction

leidota

使用cocos2d写的一个类似Dota传奇之类的demo

注意: 1、该版本使用的是cocos2d 3.2,所以如果要编译,请将cocos2d拷贝到该目录下

2、如果要编译apk,请自行配置环境,然后运行buildandroid.bat

代码结构说明 1、AI部分采用分层目标的方式,所以其中的goal保存目标,同时我这里有队伍级别的目标和队员级别的目标,由队伍级别的目标给队员发送消息来设定队员级别的目标,队员没有木有自己思考能力 (1)goal就是目标部分 (2)system这里是分离出来的系统

2、所有的角色都是character

3、entity是作为实体,其实这里貌似已经偏离当初的设计了,只是为了方便索引当前存在的所有角色而存在

3、entity是作为实体,其实这里貌似已经偏离当初的设计了,只是为了方便索引当前存在的所有角色而存

4、input之前是设计做的输入管理部分

5、joystick也是之前设计的虚拟手柄

6、map是地图,之前的版本使用网格,查看之前版本可以看到望各部分的内容

7、movment是移动部分,思路是每一个可以移动的东西里面都有一个MovingEntity,然后查询它就可以知道当前移动状态,移动采用行为驱动的方式

8、msg是消息部分,对象与对象、队伍与成员之间都是通过消息来通信

9、team是后来加入的,游戏现在越来越依靠队伍这个概念

10、tool一些工具类

11、weapons纯属后来的抽象,因为一个角色可以有多种攻击方式,所以将其抽象成武器这个概念,角色拥有什么武器,就拥有一个攻击方式

leidota's People

Contributors

hudaqi avatar

Watchers

James Cloos avatar 煎饼果子 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.