Example #1
0
    void Awake()
    {
        mancy = GameObject.Find("Mancy").GetComponent <Mancy>();
        // Setting up the reference.
        playerControl   = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
        mancyBar        = GameObject.Find("MancyBar").GetComponent <SpriteRenderer>();
        healthScale     = mancyBar.transform.localScale;
        barsize         = Screen.height * .8f;
        healthBarLength = barsize;

        // Setting up references.
        playerControl = GetComponent <PlayerControl>();
        //healthBar = GameObject.Find("HealthBar").GetComponent<SpriteRenderer>();
        //anim = GetComponent<Animator>();

        // Getting the intial scale of the healthbar (whilst the player has full health).
        //healthScale = healthBar.transform.localScale;

        UpdateHealthBar();
    }
Example #2
0
    void Awake()
    {
        mancy = GameObject.Find("Mancy").GetComponent<Mancy>();
        // Setting up the reference.
        playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>();
        mancyBar = GameObject.Find("MancyBar").GetComponent<SpriteRenderer>();
        healthScale = mancyBar.transform.localScale;
        barsize = Screen.height * .8f;
        healthBarLength = barsize;

        // Setting up references.
        playerControl = GetComponent<PlayerControl>();
        //healthBar = GameObject.Find("HealthBar").GetComponent<SpriteRenderer>();
        //anim = GetComponent<Animator>();

        // Getting the intial scale of the healthbar (whilst the player has full health).
        //healthScale = healthBar.transform.localScale;

        UpdateHealthBar ();
    }
Example #3
0
 void Awake()
 {
     pauser = GameObject.Find("Pauser").GetComponent <Pauser>();
     mancy  = GameObject.Find("Mancy").GetComponent <Mancy>();
     //collider2D.enabled = false;
 }
Example #4
0
 void Awake()
 {
     pauser = GameObject.Find("Pauser").GetComponent<Pauser>();
     mancy = GameObject.Find("Mancy").GetComponent<Mancy>();
     //collider2D.enabled = false;
 }
Example #5
0
 void Awake()
 {
     mancy = GameObject.Find("Mancy").GetComponent <Mancy>();
     // Setting up the reference.
     playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
 }
Example #6
0
 void Awake()
 {
     mancy = GameObject.Find("Mancy").GetComponent<Mancy>();
     // Setting up the reference.
     playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>();
 }