Beispiel #1
0
 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>();
 }
Beispiel #2
0
 // 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);
 }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 public void Init()
 {
     GameModel.HandleGet <PlanetModel>(OnPlanetChange);
     _unitDefenseUpdateCommand = GameModel.Get <UnitDefenseUpdateCommand>();
     _resistanceConfig         = GameConfig.Get <BellCurveConfig>();
 }