コード例 #1
0
        public void TryDoor(EnvironmentGameState destination)
        {
            if (InventoryPanel.CurrentlySelectedItem() != null)
            {
                ActionLogManager.LogActionStatic("It wasn't necessary.");
                return;
            }

            for (int i = 0; i < doors.Count; i++)
            {
                if (doors[i].destinationEnvironment == destination)
                {
                    ServiceLocator.GetService <AudioManager>().PlayOneShot(doors[i].travelSound);
                    doors[i].destinationEnvironment.LoadEnvironment();
                }
            }
        }
コード例 #2
0
ファイル: ItemPickup.cs プロジェクト: HESHyyr/GameJam2020Fall
 public void OnPressed()
 {
     playerInventory.AddItem(item);
     ActionLogManager.LogActionStatic("Picked up <color=red>" + item.Name + ".");
     Destroy(gameObject);
 }
コード例 #3
0
 private void Awake()
 {
     INSTANCE = this;
 }