示例#1
0
 public void SetStatus(eSceneStatus status)
 {
     switch (status)
     {
         case eSceneStatus.TITLE:
             break;
         case eSceneStatus.TUTORIAL:
             break;
         case eSceneStatus.PLAY:
             break;
         case eSceneStatus.INVENTORY:
             GUIInventory inventory = m_listScene[(int)eSceneStatus.INVENTORY].GetComponent<GUIInventory>();
             inventory.  SetInventory(GameManager.GetInstance().m_cPlayer);
             break;
         case eSceneStatus.BAG:
             GUIBag bag = m_listScene[(int)eSceneStatus.BAG].GetComponent<GUIBag>();
             bag.SetBag(GameManager.GetInstance().m_cPlayer);
             break;
         case eSceneStatus.EQUIPMENT:
             break;
         case eSceneStatus.COMBINATE:
             GUIBag bag1 = m_listScene[(int)eSceneStatus.COMBINATE].GetComponent<GUIBag>();
             bag1.SetBag(GameManager.GetInstance().m_cPlayer);
             GUINPCBag bag2 = m_listScene[(int)eSceneStatus.COMBINATE].GetComponent<GUINPCBag>();
             bag2.SetNPCBag(GameManager.GetInstance().m_cNPC);
             GUINPCInventory NPCInventory2 = m_listScene[(int)eSceneStatus.COMBINATE].GetComponent<GUINPCInventory>();
             NPCInventory2.SetInventory(GameManager.GetInstance().m_cNPC);
             break;
         case eSceneStatus.MENU:
             break;
     }
     ShowScene(status);
     m_eCurrentStatus = status;
 }
示例#2
0
文件: GUIManager.cs 项目: licjcb8/-
    public void SetStatus(eSceneStatus status)
    {
        switch (status)
        {
        case eSceneStatus.TITLE:
            break;

        case eSceneStatus.GAMEOVER:
            break;

        case eSceneStatus.THEEND:
            break;

        case eSceneStatus.INVENTORY:
            GUIInventory inventory = m_listScene[(int)eSceneStatus.INVENTORY].GetComponent <GUIInventory>();
            inventory.SetInventory(GameManager.GetInstance().m_cPlayer);
            break;

        case eSceneStatus.STATUS:
            break;

        case eSceneStatus.SHOP:
            break;

        case eSceneStatus.BUY:
            GUINPCInventory NPCInventory = m_listScene[(int)eSceneStatus.BUY].GetComponent <GUINPCInventory>();
            NPCInventory.SetInventory(GameManager.GetInstance().m_cNPC);
            break;

        case eSceneStatus.SELL:
            GUIBag bag1 = m_listScene[(int)eSceneStatus.SELL].GetComponent <GUIBag>();
            bag1.SetBag(GameManager.GetInstance().m_cPlayer);
            GUINPCBag bag2 = m_listScene[(int)eSceneStatus.SELL].GetComponent <GUINPCBag>();
            bag2.SetNPCBag(GameManager.GetInstance().m_cNPC);
            GUINPCInventory NPCInventory2 = m_listScene[(int)eSceneStatus.SELL].GetComponent <GUINPCInventory>();
            NPCInventory2.SetInventory(GameManager.GetInstance().m_cNPC);
            break;

        case eSceneStatus.PLAY:
            break;

        case eSceneStatus.BAG:
            GUIBag bag = m_listScene[(int)eSceneStatus.BAG].GetComponent <GUIBag>();
            bag.SetBag(GameManager.GetInstance().m_cPlayer);
            break;
        }
        ShowScene(status);
        m_eCurrentStatus = status;
    }