Esempio n. 1
0
 public UnitSettingsViewModel(IUnitSettings model)
 {
     Model = model;
     Name = "Unit Settings";
     SettingsUserControl = new UnitSettingsControl();
     SettingsUserControl.DataContext = this;
 }
Esempio n. 2
0
 public ApplyDamageController(
     IUnitSettings unitSettings,
     IOccupatedPossitionsMap occupatedPossitionsMap)
 {
     _occupatedPossitionsMap = occupatedPossitionsMap;
     _unitSettings           = unitSettings;
 }
Esempio n. 3
0
 public UnitSettingsViewModel(IUnitSettings model)
 {
     Model = model;
     Name  = "Unit Settings";
     SettingsUserControl             = new UnitSettingsControl();
     SettingsUserControl.DataContext = this;
 }
Esempio n. 4
0
        public LifeController(
            IUnitSettings unitSettings,
            IBaseActionController baseActionController)
        {
            _currentHealth = unitSettings.TotalHealth;
            _totalHealth   = unitSettings.TotalHealth;

            _baseActionController = baseActionController;
        }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
        static GlobalSettings()
        {
            UnitSettings = ModelResolver.Resolve<IUnitSettings>();
            UnitSettings.LoadSettings();

            ColorSettings = ModelResolver.Resolve<IColorSettings>();
            ColorSettings.LoadSettings();

            ClipSettings = ModelResolver.Resolve<IClipSettings>();

            FrameRateSettings = ModelResolver.Resolve<IFrameRateSettings>();
        }
Esempio n. 7
0
        static GlobalSettings()
        {
            UnitSettings = ModelResolver.Resolve <IUnitSettings>();
            UnitSettings.LoadSettings();

            ColorSettings = ModelResolver.Resolve <IColorSettings>();
            ColorSettings.LoadSettings();

            ClipSettings = ModelResolver.Resolve <IClipSettings>();

            FrameRateSettings = ModelResolver.Resolve <IFrameRateSettings>();
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
 public OneUnitAnimationController(IUnitSettings unitSettings, IGameLoopController gameLoopController)
 {
     _unit               = unitSettings.GraphicObject;
     _unitScript         = _unit.GetComponentInChildren(typeof(IUnitScript)) as IUnitScript;
     _gameLoopController = gameLoopController;
 }
Esempio n. 11
0
 public OneUnitMotionController(IUnitSettings unitSettings)
 {
     _unitSettings = unitSettings;
     _unit         = _unitSettings.GraphicObject;
 }
Esempio n. 12
0
 public OneUnitRotationController(IUnitSettings unitSettings)
 {
     _unit = unitSettings.GraphicObject.transform.Find("Unit").gameObject;
 }
Esempio n. 13
0
 public UnitSettingsXml(IUnitSettings unitSettings)
 {
     UnitsName = unitSettings.UnitsName;
     UnitsPerPixel = unitSettings.UnitsPerPixel;
 }
Esempio n. 14
0
 public UnitSettingsXml(IUnitSettings unitSettings)
 {
     UnitsName     = unitSettings.UnitsName;
     UnitsPerPixel = unitSettings.UnitsPerPixel;
 }
Esempio n. 15
0
        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++;
            }
        }
Esempio n. 16
0
 public UnitSettingsViewModel(IUnitSettings model)
 {
     Model = model;
     Name  = "Unit Settings";
 }