示例#1
0
    public void Init()
    {
        _starsConfig         = GameConfig.Get <StarsConfig>();
        _universeConfig      = GameConfig.Get <UniverseConfig>();
        _hexMapGenerator     = new HexMapGenerator();
        _planetUpdateCommand = GameModel.Get <PlanetPropsUpdateCommand>();

        GameModel.HandleGet <StarModel>(OnStarChange);
    }
示例#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);
 }