public void CreateMovementAgent(Grid grid) { if (m_Data.Asset.IsFlyingEnemy) { m_MovementAgent = new FlyingMovementAgent(m_Data.Asset.Speed, transform, grid, m_Data); } else { m_MovementAgent = new GridMovementAgent(m_Data.Asset.Speed, transform, grid, m_Data); } }
public void CreateMovementAgent(Grid grid) { if (m_Data.IsFlying) { Vector3 finalPos = grid.GetTargetNode().Position; finalPos.y = transform.position.y; m_MovementAgent = new FlyingMovementAgent(transform, finalPos, m_Data); } else { m_MovementAgent = new GridMovementAgent(transform, grid, m_Data); } }
public MovementBuilder(IMovementAgent agent) { this.agent = agent; this.behaviour = new IdleMovementBehaviour(); }
public void AttachMovementAgent(IMovementAgent agent) { m_MovementAgent = agent; }
public void CreateMovementAgent(Grid grid) { m_MovementAgent = new GridMovementAgent(m_Data.Asset.Speed, transform, grid); }