public void supply() { dropPlace = GameObject.FindGameObjectWithTag(tags).GetComponent <dropScript>(); IR = GameObject.FindGameObjectWithTag(tags).GetComponentInChildren <interactable>(); if (dropPlace & IR.isInRange) { dropPlace.index = dropPlace.index + 1; Destroy(gameObject); LS.inventoryWeight = LS.inventoryWeight - 2; scm.itemSound.Play(); } }
private void Start() { if (level1) { //Pak yudha pakYudha[0].SetActive(true); pakYudha[1].SetActive(false); //Teknisi teknisi[0].SetActive(false); teknisi[1].SetActive(false); //keyBoard keyBoard[0].SetActive(true); keyBoard[1].SetActive(false); DScript = GameObject.FindGameObjectWithTag("dropPlace").GetComponent <dropScript>(); EndTrigger.SetActive(false); } if (level2) { //Lights Lights[0].SetActive(false); Lights[1].SetActive(false); Lights[2].SetActive(false); Lights[3].SetActive(false); EndTrigger.SetActive(false); } if (level3) { //Lights Lights[0].SetActive(false); FanSwitch.SetActive(false); lift.SetActive(false); } }