Пример #1
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     ButtonQueue = new Queue<ACBuildingButtonController>();
     QueueTimer = float.MaxValue;
     CurrentButton = null;
     QueueCap = 5;
 }
 public override void Init(GameState s, GameplayController c)
 {
     ActivityInterval = 10;
     ExtractAmount = 10;
     currTime = 0;
     Enabled = true;
 }
Пример #3
0
 public override void Init(GameState s, GameplayController c, object initArgs)
 {
     resources = new List<RTSBuilding>();
     Point p = HashHelper.Hash(building.GridStartPos, s.CGrid.numCells, s.CGrid.size);
     harvestradius = 5;
     hStart = new Point(
         Math.Max(0, p.X - harvestradius),
         Math.Max(0, p.Y - harvestradius)
         );
     hEnd = new Point(
         Math.Min(s.CGrid.numCells.X - 1, p.X + harvestradius),
         Math.Min(s.CGrid.numCells.Y - 1, p.Y + harvestradius)
         );
 }
Пример #4
0
        public override void Init(RTSEngine.Data.GameState s, RTSEngine.Controllers.GameplayController c, object args)
        {
            cc = unit.CombatController;
            mc = unit.MovementController;

            unit.TargetingOrders = BehaviorFSM.TargetPassively;
            unit.CombatOrders    = BehaviorFSM.UseMeleeAttack;
            unit.MovementOrders  = BehaviorFSM.JustMove;
            SetState(BehaviorFSM.Rest);

            teamIndex = unit.Team.Index;

            // Worker Specific Stuff
            targetResource = null;
            targetDistro   = null;
            depositing     = false;
        }
Пример #5
0
 public override void Init(GameState s, GameplayController c, object args)
 {
 }
Пример #6
0
        public override void Init(GameState s, GameplayController c, object args)
        {
            cc = unit.CombatController;
            mc = unit.MovementController;

            unit.TargetingOrders = BehaviorFSM.TargetPassively;
            unit.CombatOrders = BehaviorFSM.UseRangedAttack;
            unit.MovementOrders = BehaviorFSM.JustMove;
            SetState(BehaviorFSM.Rest);

            teamIndex = unit.Team.Index;
            origin = unit.GridPosition;
        }
Пример #7
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     Pathfinder = c.pathfinder;
     NetForce = Vector2.Zero;
 }
Пример #8
0
        public override void Init(GameState s, GameplayController c, object args)
        {
            state = s;

            initArgs = args == null ? null : args as AnimationInitArgs;
            if(initArgs == null) initArgs = AnimationInitArgs.Default;

            alRest = new AnimationLoop(initArgs.Splices[0].X, initArgs.Splices[0].Y);
            alRest.FrameSpeed = initArgs.Speeds[0];
            alWalk = new AnimationLoop(initArgs.Splices[1].X, initArgs.Splices[1].Y);
            alWalk.FrameSpeed = initArgs.Speeds[1];
            alMelee = new AnimationLoop(initArgs.Splices[2].X, initArgs.Splices[2].Y);
            alMelee.FrameSpeed = initArgs.Speeds[2];
            alPrepareFire = new AnimationLoop(initArgs.Splices[3].X, initArgs.Splices[3].Y);
            alPrepareFire.FrameSpeed = initArgs.Speeds[3];
            alFire = new AnimationLoop(initArgs.Splices[4].X, initArgs.Splices[4].Y);
            alFire.FrameSpeed = initArgs.Speeds[4];
            alDeath = new AnimationLoop(initArgs.Splices[5].X, initArgs.Splices[5].Y);
            alDeath.FrameSpeed = initArgs.Speeds[5];
            SetAnimation(BehaviorFSM.None);

            System.Threading.Interlocked.Exchange(ref isInit, 1);
        }
Пример #9
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     UnitType = (int)args;
 }
Пример #10
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     pathfinder = c.pathfinder;
 }
Пример #11
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     tc = squad.TargetingController as Targeting;
     mc = squad.MovementController as Movement;
 }
Пример #12
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     teamIndex = squad.Team.Index;
 }