状态对象  ///成功还是失败  publicboolRegisterState(IStatestate)  {    if(state==null)    {      Log.Error("StateMachine.RegisterStatestateisNull!");      returnfalse;    }    if(mStateDic.ContainsKey(state.GetStateID()))    {      Log.Error("StateMachine.RegisterStatemStateDichavathiskeykey="+state.GetStateID());      return-IMDN开发者社群-imdn.cn"> 状态对象  ///成功还是失败  publicboolRegisterState(IStatestate)  {    if(state==null)    {      Log.Error("StateMachine.RegisterStatestateisNull!");      returnfalse;    }    if(mStateDic.ContainsKey(state.GetStateID()))    {      Log.Error("StateMachine.RegisterStatemStateDichavathiskeykey="+state.GetStateID());      return - IMDN开发者社群-imdn.cn">
登录
首页 » c# » unity3d 状态机

unity3d 状态机

于 2022-03-19 发布 文件大小:2.00 kB
0 91
下载积分: 2 下载次数: 1

代码说明:

有限状态机,stateMachin.cs 可以为UI 或者各种玩家,怪物添加状态,快速状态切换:   ///     /// 注册一个状态     ///     /// 状态对象     /// 成功还是失败     public bool RegisterState(IState state)     {         if (state == null)         {             Log.Error("StateMachine.RegisterState state is Null !");             return false;         }         if (mStateDic.ContainsKey(state.GetStateID()))         {             Log.Error("StateMachine.RegisterState mStateDic hava this key key = " + state.GetStateID());             return

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Multy_Window
    在VS2010环境下,利用C#语言,编写了多窗口程序(In the VS2010 environment, the use of the C# language, the preparation of a multi-window program)
    2013-04-28 17:30:36下载
    积分:1
  • bh
    说明:  cpu核设计必备工具-11个Benchmark(基准测试程序)(cpu-core design an indispensable tool for-11 months Benchmark (benchmark))
    2010-03-26 14:29:54下载
    积分:1
  • 根据经纬度坐标计算多边形面积
    计算方法比较简单,将经纬度点表示的多边形点集合, 由图知坐标原点与多边形任意相邻的两个顶点构成一个三角形,而三角形的面积可由三个顶点构成的两个平面向量的外积求得。 任意多边形的面积公式 多边形计算公式的计算和原点的选取没有关系,通常可以选点(0,0)或者多边形的第一个点(这个时候比较直观了,看起来就是把多边形分成一个个三角形和加起来,)就可以了。
    2023-08-12 19:45:04下载
    积分:1
  • Lab14
    symbian OS s60 多媒体API的使用(symbian multimedia API use)
    2009-03-28 10:01:35下载
    积分:1
  • rm644
    线性调频脉冲压缩的Matlab程序,LCMV优化设计阵列处理信号,解耦,恢复原信号。( LFM pulse compression of the Matlab program, LCMV optimization design array signal processing, Decoupling, restore the original signal.)
    2017-04-24 21:27:04下载
    积分:1
  • C 控制台贪吃蛇 无闪屏
    控制台实现的贪吃蛇小程序,完全原创,可能稍微复杂,但思路清晰,大家可以学习一下 无任何抄袭 
    2022-11-23 00:15:05下载
    积分:1
  • 人脸识别库
    What is EBLearn? Eblearn is an object-oriented C++ library that implements various machine learning models, including energy-based learning, gradient-based learning for machine composed of multiple heterogeneous modules. In particular, the library provides a complete set of tools for building, training, and running convolutional networks. A face detector trained in eblearn (Scroll to bottom for detailed outputs)
    2023-02-04 09:40:04下载
    积分:1
  • oracle
    是自己整理的一些oracle基本函数,以及一些简单命令,小实例,希望对初学者有所帮助(Some of their own finishing oracle basic functions, as well as some simple commands, a small example and I hope to help beginners)
    2013-11-05 14:58:15下载
    积分:1
  • MiniBlinkPinvoke-master
    C#简单版blink内核webbrowser浏览器开发,优点:文件极小,不像cefsharp动辄就要上百兆大小,这个只需要几百K即可(C# simple version of blink kernel web browser browser browser development, advantages: the file is very small, unlike cefshare, which requires hundreds of megabytes in size, this only needs a few hundred K)
    2019-07-05 10:54:23下载
    积分:1
  • GC-USBCAN 开源代码
    USB can 飞思卡尔学习代码,通用款,实现通用型号调试学习,无需更改,直接调用即可,通过学习,可提高对汽车单片机的认识
    2023-03-31 05:50:03下载
    积分:1
  • 696518资源总数
  • 105901会员总数
  • 40今日下载