Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 public MovementBuilder(IMovementAgent agent)
 {
     this.agent     = agent;
     this.behaviour = new IdleMovementBehaviour();
 }
Пример #4
0
 public void AttachMovementAgent(IMovementAgent agent)
 {
     m_MovementAgent = agent;
 }
Пример #5
0
 public void CreateMovementAgent(Grid grid)
 {
     m_MovementAgent = new GridMovementAgent(m_Data.Asset.Speed, transform, grid);
 }