## XIIIMP
Class MarioSuperBonus

source: C:\XIII\XIIIMP\Classes\MarioSuperBonus.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Inventory
             |
             +--XIIIMP.MarioSuperBonus

Direct Known Subclasses:Invisibility, Invulnerability, LoseArmor, LoseLife, Regeneration, SuperArmor, SuperBoost, SuperDamage, SuperDuck, Teleport

class MarioSuperBonus
extends Engine.Inventory

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`int` | `BonusIconId`
`XIIIMPHud` | `MyPlayerHud`
`XIIIMPPlayerPawn` | `MyPlayerLAN`

Function Summary
`void` | `AddIconInPlayerHud(Pawn Other)`
`void` | `RemoveIconInPlayerHud()`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class MarioSuperBonus extends Inventory;
    00005
    00006	var int BonusIconId;
    00007	var XIIIMPHud MyPlayerHud;
    00008	var XIIIMPPlayerPawn MyPlayerLAN;
    00009
    00010	function AddIconInPlayerHud( Pawn Other )
    00011	{
    00012	    local int Loop;
    00013	    local controller C;
    00014
    00015	    if( ( XIIIMPPlayerPawn(Other) != none ) && ( BotPlayer(Other) == none ) )
    00016	    {
    00017	        C = XIIIMPPlayerPawn(Other).Controller;
    00018	        MyPlayerHud = XIIIMPHud(PlayerController(C).MyHUD);
    00019
    00020	        if( MyPlayerHud != none )
    00021	        {
    00022	            MyPlayerHud.MarioBonus += BonusIconId;
    00023	        }
    00024
    00025	        if ( Level.NetMode != NM_Standalone )
    00026	        {
    00027	            MyPlayerLAN = XIIIMPPlayerPawn(Other);
    00028	            MyPlayerLAN.MarioBonusLAN += BonusIconId;
    00029	        }
    00030	    }
    00031	}
    00032
    00033	function RemoveIconInPlayerHud()
    00034	{
    00035	    if( MyPlayerHud != none )
    00036	    {
    00037	        MyPlayerHud.MarioBonus -= BonusIconId;
    00038	    }
    00039
    00040	    if( MyPlayerLAN != none )
    00041	    {
    00042	        MyPlayerLAN.MarioBonusLAN -= BonusIconId;
    00043	    }
    00044	}
    00045
    00046
    00047
    00048	defaultproperties
    00049	{
    00050	}

End Source Code