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

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

            WaypointSequence = waypointSequence;
        }
Example #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;
        }
    }
Example #4
0
		public AIWaypointMoveAction(Unit owner, AIMovementType wpMovementType)
			: base(owner)
		{
			m_waypoints = new LinkedList<WaypointEntry>();

			m_WPmovementType = wpMovementType;
		}
Example #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;
			}
		}
Example #6
0
 public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence, LinkedList <WaypointEntry> waypoints)
     : base(owner, waypointSequence, waypoints)
 {
     owner.SpawnEntry.CreateRandomWaypoints();
 }
Example #7
0
 public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence)
     : base(owner, waypointSequence)
 {
 }
 public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence,
                             LinkedList <WaypointEntry> waypoints)
     : this(owner, waypointSequence)
 {
     Waypoints = waypoints ?? WaypointEntry.EmptyList;
 }
Example #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;
				}
			}
		}
Example #10
0
 public AIWaypointMoveAction(Unit owner, AIMovementType waypointSequence,
     LinkedList<WaypointEntry> waypoints)
     : this(owner, waypointSequence)
 {
     Waypoints = waypoints ?? WaypointEntry.EmptyList;
 }
Example #11
0
		public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence, LinkedList<WaypointEntry> waypoints)
			: base(owner, waypointSequence, waypoints)
		{
			owner.SpawnEntry.CreateRandomWaypoints();
		}
Example #12
0
		public AIWanderMoveAction(NPC owner, AIMovementType waypointSequence)
			: base(owner, waypointSequence)
		{
		}