Code Monkey home page Code Monkey logo

ex-unity's People

Contributors

jareguo avatar jwu avatar nantas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ex-unity's Issues

建议将动画 Transition 的 Trigger 功能提升到它的基类里

@jwu trigger 有关代码被我暂时注释掉了。但经过考虑我还是建议将这个便利功能加入到整个状态机里头 (而不单单是动画状态机)。

原因是,在一些适合用事件跳转的场合(例如UI),使用条件状态机写代码有点过度设计的感觉。加入了 trigger 之后,你可以把条件状态机当成事件状态机来用,于是UI状态机写起来会精简很多,不需要设置一堆的 gotoMenu = true, 然后在条件里判断 if (goToMenu) 之类的。

另外一个问题是,由 游戏逻辑 主动改写 状态机 的 trigger 是否合理?其实在最普通的事件状态机里,事件的跳转就是一个消息,由逻辑主动触发,也不见得这样会有很大问题。

从目的上来说我更倾向于以最快最简单的方式虏获用户,然后通过其它途径引导用户进行合理设计。

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.