private void Start() { worldBlackboard = GameObject.Find("GameRule").GetComponentInChildren <BlackboardComponent> (); blackboard.Set("StealCD", TimeManager.EnemyTime); agent.agent.plan(); }
protected override void Awake() { base.Awake(); timeLayer = CupheadTime.Layer.Default; Routine.Settings.DebugMode = false; // 设置世界变量 worldBlackboard.Set(VAR_AvailableExpressPackages, new List <GameObject>()); worldBlackboard.Set(VAR_PlacedExpressPackages, new List <GameObject>()); worldBlackboard.Set(VAR_Player, player.transform); worldBlackboard.Set(VAR_PlayerHand, player.GetComponentInChildren <Hand>()); worldBlackboard.Set(VAR_ExpressPackageGenerator, expressPackageGenerator); worldBlackboard.Set(VAR_FillPiter, fillPit); worldBlackboard.Set(VAR_EscapePoint, escapePoint); // 监听游戏事件 EventKit.Subscribe <GameObject> (GlobalSymbol.EVT_ExpressPackageGenerated, onExpressPackageGenerated); EventKit.Subscribe <GameObject> (GlobalSymbol.EVT_ExpressPackagePlaced, onExpressPackagePlaced); EventKit.Subscribe <GameObject> (GlobalSymbol.EVT_ExpressPackageDestroyed, onExpressPackageDestroyed); }