Ejemplo n.º 1
0
    public bool Damage()
    {
        countLife--;
        //Messenger<int>.Broadcast(GameEvent.LIFE_HIT, countLife);
        lifeBar.MinusLife(countLife);
        if (!Convert.ToBoolean(countLife))
        {
            hManager.PlayerIsDEad();
            hManager.DeletePointAtLvl(hManager.GetIndexCurrentScoreArray());
            Messenger.Broadcast(GameEvent.GAME_END);
            Messenger <string> .Broadcast(GameEvent.SHOW_MENU, hManager.LString());

            gController.EndLvl();
            return(true);
        }
        else
        {
            return(false);
        }
    }