public void ActivateShelter(CaveScript newShelter) { shelter = newShelter; //SpriteRenderer renderer = other.gameObject.GetComponent<SpriteRenderer>(); //if (renderer != null) //{ GetComponent<SpriteRenderer>().enabled = false; //} }
public void ActivateShelter(CaveScript newShelter) { shelter = newShelter; //SpriteRenderer renderer = other.gameObject.GetComponent<SpriteRenderer>(); //if (renderer != null) //{ GetComponent <SpriteRenderer>().enabled = false; //} }
// Use this for initialization void Start() { hud = (GameObject) Instantiate(hudPrefab);//, //transform.position + new Vector3(offset.x, offset.y, 0.0f), //Quaternion.identity); GameObject canvas = GameObject.Find("Canvas"); hud.transform.SetParent(canvas.transform, true); value = -1; UpdateValue(0); cave = GetComponent<CaveScript>(); victim = GetComponent<VictimScript>(); }
// Use this for initialization void Start() { hud = (GameObject)Instantiate(hudPrefab); //, //transform.position + new Vector3(offset.x, offset.y, 0.0f), //Quaternion.identity); GameObject canvas = GameObject.Find("Canvas"); hud.transform.SetParent(canvas.transform, true); value = -1; UpdateValue(0); cave = GetComponent <CaveScript>(); victim = GetComponent <VictimScript>(); }
public void DeactivateShelter() { shelter = null; GetComponent<SpriteRenderer>().enabled = true; }
public void DeactivateShelter() { shelter = null; GetComponent <SpriteRenderer>().enabled = true; }