void Start() { rts = GameObject.FindWithTag("Character").GetComponent <RuntimeSetup>(); Character = GameObject.FindWithTag("Character").GetComponent <Character>(); //rigBod = GetComponent<Rigidbody2D>(); onLoad = GetComponent <onLoadPlayer>(); UpdateHealthUI(health); }
public void Update() { try { neverdieInventory = GameObject.FindGameObjectWithTag("NEVERDIE").GetComponent <Inventory>(); playerOnLoad = GameObject.FindGameObjectWithTag("Player").GetComponent <onLoadPlayer>(); } catch { Debug.Log("trying to initialise neverdie inventory, FAILED"); } }
public void fwt() { try { player = GameObject.FindGameObjectWithTag("Player"); PlayerLoad = player.GetComponent <onLoadPlayer>(); playerScript = player.GetComponent <CharacterScript>(); ChangeEquipment = player.GetComponent <ChangeWeapon>(); } catch { Debug.Log("Inventory could not find with tag"); } }