Exemplo n.º 1
0
 void Start()
 {
     weaponSwitch    = GetComponent <WeaponSwitch>();
     equippedWeapons = new Weapon1[weaponSwitch.maxWeapons];
     pause           = GetComponent <PauseGame>();
     control         = GetComponent <PlayerInputControls>();
     if (chestDisplay == null)
     {
         chestDisplay = transform.GetComponentInChildren <DisplayChestContents>();
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     text = GetComponent <Text>();
     if (player == null)
     {
         player = transform.root.gameObject;
     }
     inventory = player.GetComponent <PlayerInventory>();
     if (chestDisplay == null)
     {
         chestDisplay = transform.parent.parent.GetComponentInChildren <DisplayChestContents>();
     }
 }