Ejemplo n.º 1
0
    private void OnCureInvoke(IGameEvent obj)
    {
        if (dados.PontosDeVida > 0)
        {
            StandardSendGameEvent ssge = (StandardSendGameEvent)obj;
            Dados.ConsomeMana((int)ssge.MyObject[0]);
            Dados.AdicionarVida((int)ssge.MyObject[1]);

            estado = EstadoDePersonagem.aPasseio;

            EventAgregator.Publish(new StandardSendGameEvent(gameObject, EventKey.changeLifePoints, Dados.PontosDeVida, Dados.MaxVida));
            EventAgregator.Publish(new StandardSendGameEvent(gameObject, EventKey.changeMagicPoints, Dados.PontosDeMana, Dados.MaxMana));
        }
    }