예제 #1
0
            public static AmmoLoadState CreateFromCurrentAmmo(ActiveModule module)
            {
                var ammo = module.GetAmmo();

                if (ammo == null || ammo.Definition == 0)
                {
                    return(null);
                }

                return(new AmmoLoadState(module, ammo.Definition));
            }
 public CycleTimeProperty(ActiveModule module) : base(module, AggregateField.cycle_time)
 {
     _module = module;
 }
 public OptimalRangeProperty(ActiveModule module) : base(module, AggregateField.optimal_range)
 {
     _module = module;
     AddEffectModifier(AggregateField.effect_optimal_range_modifier);
 }
예제 #4
0
 protected ModuleState(ActiveModule module, ModuleStateType type)
 {
     Module = module;
     Type   = type;
 }
예제 #5
0
 public ShutdownState(ActiveModule module, IntervalTimer timer) : base(module, ModuleStateType.Shutdown)
 {
     _timer = timer;
 }
예제 #6
0
 public AmmoLoadState(ActiveModule module, int ammoDefinition) : base(module)
 {
     _ammoDefinition = ammoDefinition;
 }
예제 #7
0
 public AmmoUnloadState(ActiveModule module) : base(module)
 {
 }
예제 #8
0
 protected AmmoHandlerState(ActiveModule module) : base(module, ModuleStateType.AmmoLoad)
 {
     Debug.Assert(module.ParentRobot != null, "module.ParentRobot != null");
     _timer = new IntervalTimer(module.ParentRobot.AmmoReloadTime);
 }
예제 #9
0
 public ActiveState(ActiveModule module, ModuleStateType type) : base(module, type)
 {
 }
예제 #10
0
 public IdleState(ActiveModule module) : base(module, ModuleStateType.Idle)
 {
 }