protected override void OnSetup() { cachedBody = Agent.Body; cachedTurn = Agent.Turner; cachedMove = Agent.Mover; if (Sight < Range) { _sight = Range; } baseDeltaCount = InfluenceManager.GenerateDeltaCount(Sight); rangeDeltaCount = InfluenceManager.GenerateDeltaCount(Range); fastRange = (Range * Range); attackFrameCount = AttackRate; basePriority = cachedBody.Priority; CanMove = cachedMove.IsNotNull(); if (CanMove) { cachedMove.OnArrive += HandleOnArrive; cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; } CanTurn = cachedTurn.IsNotNull(); }
protected override void OnSetup() { cachedTurn = Agent.GetAbility <Turn>(); cachedMove = Agent.GetAbility <Move>(); if (Sight < Range) { _sight = Range + FixedMath.One * 5; } //fastRange = (Range * Range); basePriority = cachedBody.Priority; CanMove = cachedMove.IsNotNull(); if (CanMove) { cachedMove.onArrive += HandleOnArrive; cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; } CanTurn = cachedTurn.IsNotNull(); CachedAgentValid = this.AgentValid; }
protected override void OnSetup() { cachedTurn = Agent.GetAbility <Turn>(); cachedMove = Agent.GetAbility <Move>(); if (Sight < Range) { _sight = Range; } fastRange = (Range * Range); attackFrameCount = AttackRate; basePriority = cachedBody.Priority; CanMove = cachedMove.IsNotNull(); if (CanMove) { cachedMove.onArrive += HandleOnArrive; cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; } CanTurn = cachedTurn.IsNotNull(); }
protected override void OnSetup() { cachedBody = Agent.Body; cachedTurn = Agent.Turner; cachedMove = Agent.Mover; if (Sight < Range) _sight = Range; baseDeltaCount = InfluenceManager.GenerateDeltaCount(Sight); rangeDeltaCount = InfluenceManager.GenerateDeltaCount(Range); fastRange = (Range * Range); attackFrameCount = AttackRate; basePriority = cachedBody.Priority; CanMove = cachedMove .IsNotNull(); if (CanMove) { cachedMove.OnArrive += HandleOnArrive; cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; } CanTurn = cachedTurn .IsNotNull(); }