Exemplo n.º 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;
 }
Exemplo n.º 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)
         );
 }
Exemplo n.º 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;
        }
Exemplo n.º 5
0
 public override void Init(GameState s, GameplayController c, object args)
 {
 }
Exemplo n.º 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;
        }
Exemplo n.º 7
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     Pathfinder = c.pathfinder;
     NetForce = Vector2.Zero;
 }
Exemplo n.º 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);
        }
Exemplo n.º 9
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     UnitType = (int)args;
 }
Exemplo n.º 10
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     pathfinder = c.pathfinder;
 }
Exemplo n.º 11
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     tc = squad.TargetingController as Targeting;
     mc = squad.MovementController as Movement;
 }
Exemplo n.º 12
0
 public override void Init(GameState s, GameplayController c, object args)
 {
     teamIndex = squad.Team.Index;
 }