public UnitSettingsViewModel(IUnitSettings model) { Model = model; Name = "Unit Settings"; SettingsUserControl = new UnitSettingsControl(); SettingsUserControl.DataContext = this; }
public ApplyDamageController( IUnitSettings unitSettings, IOccupatedPossitionsMap occupatedPossitionsMap) { _occupatedPossitionsMap = occupatedPossitionsMap; _unitSettings = unitSettings; }
public LifeController( IUnitSettings unitSettings, IBaseActionController baseActionController) { _currentHealth = unitSettings.TotalHealth; _totalHealth = unitSettings.TotalHealth; _baseActionController = baseActionController; }
public OneUnitHealthController(IUnitSettings unitSettings, Camera camera) { _unit = unitSettings.GraphicObject; _lookAtCameraController = _unit.GetComponentInChildren(typeof(LookAtCameraController)) as LookAtCameraController; _lookAtCameraController.main_camera = camera; _healthBarController = _unit.GetComponentInChildren(typeof(HealthBarController)) as HealthBarController; _healthBarController.Set(1.0f); _healthBarGameObject = _unit.transform.Find("healthbar").gameObject; }
static GlobalSettings() { UnitSettings = ModelResolver.Resolve<IUnitSettings>(); UnitSettings.LoadSettings(); ColorSettings = ModelResolver.Resolve<IColorSettings>(); ColorSettings.LoadSettings(); ClipSettings = ModelResolver.Resolve<IClipSettings>(); FrameRateSettings = ModelResolver.Resolve<IFrameRateSettings>(); }
static GlobalSettings() { UnitSettings = ModelResolver.Resolve <IUnitSettings>(); UnitSettings.LoadSettings(); ColorSettings = ModelResolver.Resolve <IColorSettings>(); ColorSettings.LoadSettings(); ClipSettings = ModelResolver.Resolve <IClipSettings>(); FrameRateSettings = ModelResolver.Resolve <IFrameRateSettings>(); }
public PlayerController( IGameEvents gameEvents, IEventDispatcher eventDispatcher, IUnitSettings unitSettings, IOccupatedPossitionsMap occupatedPossitionsMap, IStateControllerExternal stateController, ILifeController lifeController, IUnitEvents unitEvents, IUnitInfoExternal unitInfo ) : base(occupatedPossitionsMap, unitEvents, stateController, lifeController, unitInfo) { _gameEvents = gameEvents; _eventDispatcher = eventDispatcher; _unitSettings = unitSettings; Initialize(); }
protected override IWhiskerVelocityFrame[] CreateData(IMouseFrame[] frames) { int frameCount = frames.Length; IWhiskerVelocityFrame[] data = new IWhiskerVelocityFrame[frameCount]; IWhiskerVelocityFrame previousFrame = null; for (int i = 0; i < frameCount; i++) { IWhiskerVelocityFrame frameData = ModelResolver.Resolve <IWhiskerVelocityFrame>(); IFrameRateSettings frameRateSettings = GlobalSettings.GlobalSettings.FrameRateSettings; IUnitSettings unitSettings = GlobalSettings.GlobalSettings.UnitSettings; frameData.LoadData(frames[i], previousFrame, frameRateSettings, unitSettings); data[frames[i].IndexNumber] = frameData; previousFrame = frameData; } return(data); }
public OneUnitAnimationController(IUnitSettings unitSettings, IGameLoopController gameLoopController) { _unit = unitSettings.GraphicObject; _unitScript = _unit.GetComponentInChildren(typeof(IUnitScript)) as IUnitScript; _gameLoopController = gameLoopController; }
public OneUnitMotionController(IUnitSettings unitSettings) { _unitSettings = unitSettings; _unit = _unitSettings.GraphicObject; }
public OneUnitRotationController(IUnitSettings unitSettings) { _unit = unitSettings.GraphicObject.transform.Find("Unit").gameObject; }
public UnitSettingsXml(IUnitSettings unitSettings) { UnitsName = unitSettings.UnitsName; UnitsPerPixel = unitSettings.UnitsPerPixel; }
public void LoadData(IMouseFrame frame, IWhiskerVelocityFrame previousFrame, IFrameRateSettings frameRateSettings, IUnitSettings unitSettings) { TargetFrame = frame; int numberOfWhiskers = TargetFrame.Whiskers.Length; int previousFrameCounter = 0; ISingleWhiskerVelocity nosePoint = null; for (int i = 0; i < numberOfWhiskers; i++) { IWhisker whisker = TargetFrame.Whiskers[i]; ISingleWhiskerVelocity singleWhiskerVelocity = ModelResolver.Resolve <ISingleWhiskerVelocity>(); singleWhiskerVelocity.Whisker = whisker; singleWhiskerVelocity.FrameRateSettings = frameRateSettings; singleWhiskerVelocity.UnitSettings = unitSettings; singleWhiskerVelocity.NosePoint = nosePoint; if (whisker.WhiskerId == -1) { nosePoint = singleWhiskerVelocity; } if (previousFrame != null) { singleWhiskerVelocity.PreviousFrame = previousFrame.Targets[previousFrameCounter]; } Targets.Add(singleWhiskerVelocity); previousFrameCounter++; } }
public UnitSettingsViewModel(IUnitSettings model) { Model = model; Name = "Unit Settings"; }