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); }
protected ModuleState(ActiveModule module, ModuleStateType type) { Module = module; Type = type; }
public ShutdownState(ActiveModule module, IntervalTimer timer) : base(module, ModuleStateType.Shutdown) { _timer = timer; }
public AmmoLoadState(ActiveModule module, int ammoDefinition) : base(module) { _ammoDefinition = ammoDefinition; }
public AmmoUnloadState(ActiveModule module) : base(module) { }
protected AmmoHandlerState(ActiveModule module) : base(module, ModuleStateType.AmmoLoad) { Debug.Assert(module.ParentRobot != null, "module.ParentRobot != null"); _timer = new IntervalTimer(module.ParentRobot.AmmoReloadTime); }
public ActiveState(ActiveModule module, ModuleStateType type) : base(module, type) { }
public IdleState(ActiveModule module) : base(module, ModuleStateType.Idle) { }