Giter VIP home page Giter VIP logo

m969 / egameplay Goto Github PK

View Code? Open in Web Editor NEW
1.7K 38.0 427.0 88.33 MB

一个基于Entity-Component模式的灵活、通用、可扩展的轻量战斗(技能)框架,配置可选使用ScriptableObject或是Excel表格. A flexible, generic, easy to extend, lightweight combat (skills) framework based on Entity-Component pattern. Configuration can choose to use ScriptableObject or Excel tables.

License: MIT License

C# 99.49% ShaderLab 0.51%
unity gameplay skill buff status editor scriptableobject skillsystem rpg mmorpg

egameplay's Introduction

EGamePlay


Unity Version: 2021.3.1f1 Status: Work-in-progress

Stargazers over time

Stargazers over time


文档:


知乎文章:


demo运行

  • rpg demo,运行RpgExample Scene场景
  • 回合制demo,运行TurnBaseExample Scene场景
  • 技能调试编辑,运行ExecutionLinkScene场景

如何制作一个简单的技能

  • 首先在SkillConfig表里添加一个技能,给定技能id,配置参数
  • 然后右键选择 技能|状态/技能配置 创建对应id的技能配置,配置效果
  • 然后右键选择 技能|状态/Execution 创建对应id的技能执行体,配置片段表现
  • 最后就是运行时将技能挂载到CombatEntity上,再通过施法组件SpellComponent释放技能即可

该项目使用了以下收费插件:


如何将EGamePlay移植到别的Unity工程

如果要将EGamePlay移植到自己的Unity工程里,首先要确保Odin Inspector插件已经在工程中,然后再将以下目录拖过去即可:

  • EGamePlay/Assets/Editor
  • EGamePlay/Assets/EGamePlay
  • EGamePlay/Assets/EGamePlay.Unity
  • Plugins/Editor/npoi

如果要使用Excel配置流程的话,还需要将以下目录复制过去,再生成配置

  • EGamePlay/Excel


CombatEntity CombatEntity
Attribute、Numeric NumericFloat
Ability Ability
StatusAbility StatusAbility
SkillAbility SkillAbility
AbilityEffect AbilityEffect
ExpressionParser ExpressionParser
ExecutionLink ExecutionLink

基于Odin和ScriptableObject实现的灵活的技能、buff配置工具

SkillConfigImage.png


技能ScriptableObject配置和Excel配置流程切换命令

之前的命令新版unity用不了了,需要手动到PlayerSettings面板添加 EGAMEPLAY_EXCEL 条件编译

技能Excel配置

SkillConfigImage.png

状态Excel配置

SkillConfigImage.png

技能效果Excel配置

SkillConfigImage.png


EGamePlay战斗框架技术讨论交流qq群:763696367

对战斗感兴趣的同学可以进群一起探讨更合适、高效的战斗框架实现
对EGamePlay有任何疑问或建议可以进群反馈,或是提在Discussions


联网同步demo在这里 https://github.com/m969/AOGame


其他类似项目


参考

egameplay's People

Contributors

m969 avatar m969041 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

egameplay's Issues

资源丢失

SerializedScriptableObject引用丢失打开编辑器时报空, unity 2019.4.9f1

个人感觉框架中Entity与Component的区别与定义有点模糊了

AttributeComponent作为一个逻辑分块,属于Component类型,然而其中管理的FloatNumeric却是Entity类型并且是挂载在父Entity下的,只在字典中对其保留引用,并没有真正直观合理的树形结构,究其原因就是因为在设计上Component是不支持挂载子节点的。

实际上我能否只抽象出一个支持目前树形结构的BaseEntity类,不做Entity与Compoennt的分化,使得任何已有的Component类也能够挂载子节点,是否会更加合理呢?

希望大佬不吝赐教。

unity2018报错

基本是error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 6.0 language specification

运行RPGdemo点击道具图标,直接报错

运行RPGdemo点击道具图标,直接报错

KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0)
EGamePlay.Combat.AttributeComponent.GetNumeric (System.String attributeName) (at Assets/EGamePlay/Combat/Attribute/AttributeComponent.cs:47)
EquipmentComponent.AddItemData (EGamePlay.ItemData itemData) (at Assets/EGPsExamples/RpgExample/Scripts/EquipmentComponent.cs:34)
Hero+<>c__DisplayClass40_0.b__0 () (at Assets/EGPsExamples/RpgExample/MonoScripts/Hero.cs:126)
UnityEngine.Events.InvokableCall.Invoke () (at <9054c48fe492485bb63cc80f3d8fbba1>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <9054c48fe492485bb63cc80f3d8fbba1>:0)

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.