Exemplo n.º 1
0
 void Start()
 {
     _skillCommand = GameModel.Get <SkillCommand>();
     _pay          = GameModel.Get <CompoundPaymentService>();
     GameModel.HandleGet <PlanetModel>(OnPlanetChange);
     GameModel.HandleGet <UnitModel>(OnUnitChange);
 }
Exemplo n.º 2
0
 public void Init()
 {
     _unitEquipCommand = GameModel.Get <UnitEquipCommand>();
     _pay = GameModel.Get <CompoundPaymentService>();
     GameModel.HandleGet <PlanetModel>(OnPlanetChange);
     GameMessage.Listen <CompoundControlMessage>(OnCompoundControlMessage);
     GameMessage.Listen <CompoundEquipMessage>(OnCompoundDropMessage);
 }
Exemplo n.º 3
0
 public void Init()
 {
     _pay              = GameModel.Get <CompoundPaymentService>();
     _controller       = GameModel.Get <UnitController>();
     _planetController = GameModel.Get <PlanetController>();
     _markedHexes      = new List <HexModel>();
     GameMessage.Listen <SkillDeactivateAllMessage>(OnSkillDeactivate);
 }
Exemplo n.º 4
0
    public override void OnDestroy()
    {
        base.OnDestroy();

        GameModel.RemoveHandle <PlanetModel>(OnPlanetChange);
        GameModel.RemoveHandle <UnitModel>(OnUnitChange);
        GameMessage.StopListen <SkillDeactivateAllMessage>(OnSkillDeactivate);

        _tooltipMessage.Action = TooltipAction.HIDE;
        GameMessage.Send(_tooltipMessage);

        _life              = null;
        _skillCommand      = null;
        _pay               = null;
        _tooltipMessage    = null;
        _deactivateMessage = null;
        _unit              = null;
    }