コード例 #1
0
    /// <summary>
    /// Called by the main menu manager before it destroys itself. The buffs that were determined at the main menu are passed in and assigned.
    /// </summary>
    /// <param name="mPlayer1Buffs"></param>
    /// <param name="mPlayer2Buffs"></param>
    public void SetPlayerBuffs(STR_CurrentPlayerBuffs mPlayer1Buffs, STR_CurrentPlayerBuffs mPlayer2Buffs)
    {
        player1Inventory = GameObject.FindGameObjectWithTag("Player1").GetComponent <SCR_CharacterInventory>();
        player2Inventory = GameObject.FindGameObjectWithTag("Player2").GetComponent <SCR_CharacterInventory>();

        player1Buffs = mPlayer1Buffs;
        player2Buffs = mPlayer2Buffs;

        if (player1Inventory)
        {
            player1Inventory.SetPlayerBuff(mPlayer1Buffs);
        }

        if (player2Inventory)
        {
            player2Inventory.SetPlayerBuff(mPlayer2Buffs);
        }
    }
コード例 #2
0
 public override void SetPlayerParent(GameObject mPlayer)
 {
     playerInventorySCR = mPlayer.GetComponent <SCR_CharacterInventory>();
 }