public override GameCommandStatus FixedStep()
        {
            Debug.Log("I exist");

            if (!oneFramePassed)
            {
                oneFramePassed = true;

                Target = new WorldPositionTarget(_data.worldPos);

                return(GameCommandStatus.InProgress);
            }
            else
            {
                return(GameCommandStatus.Complete);
            }
        }
Exemplo n.º 2
0
        public override GameCommandStatus FixedStep()
        {
            Debug.Log("I exist");
            WorldPosition wp = _data.commanderAbility2.GetFormationTargetsArray [_data.targetElement];

            if (wp != new WorldPosition(-5000, -5000))
            {
                Target = new WorldPositionTarget(wp);
                Debug.Log("the target I received from commander is: " + (wp.X) + " " + (wp.Y));
                //Debug.Log (TargetPriority + " is my target priority");
                return(GameCommandStatus.InProgress);
            }
            else
            {
                _unit.Abilities.Remove(this);
                return(GameCommandStatus.Complete);
            }
        }
 public FormationTargetAbility(UnitModel unit, AbilityData abilityData)
 {
     _unit  = unit;
     _data  = new FormationAbilityParams(abilityData);
     Target = new WorldPositionTarget(_data.worldPos);
 }