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); }
private void Update() { if (_ActionQueue.Count > 0) { // dequeue one action per frame. var queue = _ActionQueue.Dequeue(); if (queue != null) { queue(); } } BotAStar.RunOneFrame(); }