Exemple #1
0
 public void ActivateShelter(CaveScript newShelter)
 {
     shelter = newShelter;
     //SpriteRenderer renderer = other.gameObject.GetComponent<SpriteRenderer>();
     //if (renderer != null)
     //{
     GetComponent<SpriteRenderer>().enabled = false;
     //}
 }
Exemple #2
0
 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>();
    }
Exemple #5
0
 public void DeactivateShelter()
 {
     shelter = null;
     GetComponent<SpriteRenderer>().enabled = true;
 }
Exemple #6
0
 public void DeactivateShelter()
 {
     shelter = null;
     GetComponent <SpriteRenderer>().enabled = true;
 }