Esempio n. 1
0
		public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence)
			: base(owner)
		{
			m_waypoints = new LinkedList<WaypointEntry>();

			_waypointSequence = waypointSequence;
		}
Esempio n. 2
0
        public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence)
            : base(owner)
        {
            Waypoints = new LinkedList <WaypointEntry>();

            WaypointSequence = waypointSequence;
        }
Esempio n. 3
0
    private void changeMovmentType(AIMovementType mType)
    {
        moveType = mType;

        switch (moveType)
        {
        case AIMovementType.Still:
            destroyCurrentMoveBehavior(null);
            break;

        case AIMovementType.Strafe:
            destroyCurrentMoveBehavior(typeof(Strafe));
            if (currentMoveBehavior == null)                      // add component if not already there
            {
                currentMoveBehavior = transform.GetOrAddComponent <Strafe>();
            }
            break;

        case AIMovementType.Rush:
            break;

        case AIMovementType.GoTo:
            break;

        default:
            break;
        }
    }
Esempio n. 4
0
		public AIWaypointMoveAction(Unit owner, AIMovementType wpMovementType)
			: base(owner)
		{
			m_waypoints = new LinkedList<WaypointEntry>();

			m_WPmovementType = wpMovementType;
		}
Esempio n. 5
0
		public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence,
			LinkedList<WaypointEntry> waypoints)
			: this(owner, waypointSequence)
		{
			if (waypoints == null)
			{
				m_waypoints = WaypointEntry.EmptyList;
			}
			else
			{
				m_waypoints = waypoints;
			}
		}
Esempio n. 6
0
 public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence, LinkedList <WaypointEntry> waypoints)
     : base(owner, waypointSequence, waypoints)
 {
     owner.SpawnEntry.CreateRandomWaypoints();
 }
Esempio n. 7
0
 public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence)
     : base(owner, waypointSequence)
 {
 }
Esempio n. 8
0
 public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence,
                             LinkedList <WaypointEntry> waypoints)
     : this(owner, waypointSequence)
 {
     Waypoints = waypoints ?? WaypointEntry.EmptyList;
 }
Esempio n. 9
0
		public override void Start()
		{
			m_stayingOnWaypoint = true;
			m_desiredStartMovingTime = 0;
			m_owner.Movement.MoveType = AIMoveType.Walk;

			var spawn = m_owner.SpawnPoint;
			if (spawn != null)
			{
				var spawnEntry = spawn.SpawnEntry;

				if (spawnEntry != null)
				{
					_waypointSequence = spawnEntry.MoveType;
				}
			}
		}
Esempio n. 10
0
 public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence,
     LinkedList<WaypointEntry> waypoints)
     : this(owner, waypointSequence)
 {
     Waypoints = waypoints ?? WaypointEntry.EmptyList;
 }
Esempio n. 11
0
		public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence, LinkedList<WaypointEntry> waypoints)
			: base(owner, waypointSequence, waypoints)
		{
			owner.SpawnEntry.CreateRandomWaypoints();
		}
Esempio n. 12
0
		public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence)
			: base(owner, waypointSequence)
		{
		}