示例#1
0
文件: Enemy.cs 项目: mengtest/Snake-3
    public override void SetData(PlayerInfo data, int initBodyLength)
    {
        _BevTree                   = BotFactory.GetBehaviourTree();
        _BevWorkingData            = new BotWorkingData();
        _BevWorkingData._Character = this;
        base.SetData(data, initBodyLength);

        _PathUtil = this.gameObject.AddComponent <BotAStar>();
        _PathUtil.SetData(this);
        _PlayerCamera.SetData(_Head.transform);
    }
示例#2
0
 private void Update()
 {
     if (_ActionQueue.Count > 0)
     {
         // dequeue one action per frame.
         var queue = _ActionQueue.Dequeue();
         if (queue != null)
         {
             queue();
         }
     }
     BotAStar.RunOneFrame();
 }