Beispiel #1
0
        private Stats stats; // Overall stats

        #endregion Fields

        #region Constructors

        public Unit(String name, Stats stats, Vector2 position)
        {
            this.name = name;
            this.stats = stats;
            this.currentStats = stats;
            this.position = position;
            this.attackState = false;

            this.positionState = PositionState.Stay;
            this.positionTarget = this;

            //movement = new MoveTimer(0,6.0f, position, position, stats.speed);
            movement = new MoveTimer(0,6.0f, position, position, currentStats.speed);
        }
Beispiel #2
0
 public void InitializePlayState()
 {
     if (intelligence != null) {
         intelligence(this);
     }
     attackCompleted = false;
     if (attackState)
     {
         this.movement = new MoveTimer(
             0, 6.0f, this.position, this.AttackTarget.Position,
             this.stats.speed);
     }
     else
     {
         this.movement = new MoveTimer(
             0, 6.0f, this.position, this.positionTarget.Position,
             this.stats.speed);
     }
 }