예제 #1
0
        //
        // Event Handlers
        //

        static void _GhostAttacked(object sender, CritterAttackedEventArgs e)
        {
            var ghost = sender as Critter;

            // regenerate HP
            ghost.Stat[Stats.CurrentHP] = ghost.Stat[Stats.MaxLife];

            // scream to scary player
            ghost.SayMsg(Say.ShoutOnHead, TextMsg.Dlg, TextMsg.DlgStr(Dialogs.Ghost, Str.Scream));

            // do nothing after attack
            e.PreventDefaults();
        }
예제 #2
0
        //
        // Event Handlers
        //
        static void _GhostAttacked(object sender, CritterAttackedEventArgs e)
        {
            var ghost = sender as Critter;
            // regenerate HP
            ghost.Stat[Stats.CurrentHP] = ghost.Stat[Stats.MaxLife];

            // scream to scary player
            ghost.SayMsg(Say.ShoutOnHead, TextMsg.Dlg, TextMsg.DlgStr(Dialogs.Ghost, Str.Scream));

            // do nothing after attack
            e.PreventDefaults();
        }