public void Init() { _compounds = GameConfig.Get <CompoundConfig>(); _unitController = GameModel.Get <UnitController>(); _planetController = GameModel.Get <PlanetController>(); _message = new CompoundControlMessage(0, CompoundControlAction.ADD, false); _unitDefenseUpdateCommand = GameModel.Get <UnitDefenseUpdateCommand>(); }
// Use this for initialization void Start() { _unitDefenseCommand = GameModel.Get <UnitDefenseUpdateCommand>(); _planetUpdateCommand = GameModel.Get <PlanetPropsUpdateCommand>(); _hexScoreUpdateCommand = GameModel.Get <HexScoreUpdateCommand>(); _mineSkill = GameModel.Get <MineSkill>(); _liveSkill = GameModel.Get <LiveSkill>(); _clock = GameModel.Get <Clock>(); _debug = GameModel.Get <GameDebug>(); GameModel.HandleGet <PlanetModel>(OnPlanetChange); GameMessage.Listen <ClockTickMessage>(OnClockTick); }
public void Init() { _factory = GameModel.Get <UnitFactory>(); _skillCommand = GameModel.Get <SkillCommand>(); _unitDefenseUpdateCommand = GameModel.Get <UnitDefenseUpdateCommand>(); _unitUseCompoundCommand = GameModel.Get <UnitUseCompoundCommand>(); GameModel.HandleGet <PlanetModel>(OnPlanetChange); GameMessage.Listen <HexClickedMessage>(OnHexClickedMessage); //GameMessage.Listen<ClockTickMessage>( OnClockTick ); GameMessage.Listen <ResistanceUpgradeMessage>(OnResistanceUpgrade); GameMessage.Listen <UnitPropUpgradeMessage>(OnUnitPropUpgradeMessage); GameMessage.Listen <UnitUseCompoundMessage>(OnUnitUseCompoundMessage); GameMessage.Listen <UnitSelectMessage>(OnUnitSelectMessage); GameMessage.Listen <UnitAddMessage>(OnUnitAddMessage); }
public void Init() { GameModel.HandleGet <PlanetModel>(OnPlanetChange); _unitDefenseUpdateCommand = GameModel.Get <UnitDefenseUpdateCommand>(); _resistanceConfig = GameConfig.Get <BellCurveConfig>(); }