Ejemplo n.º 1
0
 private void OnCountersIncreased()
 {
     if (guiCounter == 1)
     {
         Cursor.lockState = CursorLockMode.None;
         Cursor.visible   = true;
         characterSwitch.SetLocked(true);
     }
     if (characterInputCounter[characterSwitch.GetCurrentCharacterIndex()] == 1)
     {
         Opsive.ThirdPersonController.EventHandler.ExecuteEvent(characterSwitch.GetCurrentCharacter(), "OnAllowGameplayInput", false);
     }
 }
Ejemplo n.º 2
0
 void DropTheRestItems(int size)
 {
     if (size < mainInventory.ItemsInInventory.Count)
     {
         for (int i = size; i < mainInventory.ItemsInInventory.Count; i++)
         {
             GameObject dropItem = Instantiate(mainInventory.ItemsInInventory[i].itemModel);
             dropItem.AddComponent <PickUpItem>();
             dropItem.GetComponent <PickUpItem>().item = mainInventory.ItemsInInventory[i];
             dropItem.transform.localPosition          = characterSwitch.GetCurrentCharacter().transform.localPosition;
         }
     }
 }
Ejemplo n.º 3
0
        public override void Spawn()
        {
            transform.SetParent(characterSwitch.transform);

            if (missionCriticalCharacter)
            {
                Destroy(GameObject.Find("Menu UI"));
                SceneManager.LoadSceneAsync("Title", LoadSceneMode.Single);
            }
            else if (characterSwitch.GetCurrentCharacter() == gameObject)
            {
                characterSwitch.Switch();
            }
        }
Ejemplo n.º 4
0
        public void Create(int itemId, int itemAmount)
        {
            StorageInventory destinationStorage = characterSwitch.GetCurrentCharacter().GetComponentInChildren <StorageInventory>();

            destinationStorage.AddItemToStorage(itemId, itemAmount);
        }