private Animator anim;                              // Reference to the Animator component.


    void Awake()
    {
        // Setting up the references.
        anim       = transform.root.gameObject.GetComponent <Animator>();
        playerCtrl = transform.root.GetComponent <MihoControll>();
        lb         = transform.root.GetComponent <LayBombs> ();
    }
    private Animator anim;                              // Reference to the Animator on the player


    void Awake()
    {
        // Setting up references.
        playerControl = GetComponent <MihoControll>();
        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;
    }
Esempio n. 3
0
 void Awake()
 {
     anim       = transform.root.gameObject.GetComponent <Animator>();
     sc         = transform.root.GetComponent <Score> ();
     playerCtrl = transform.root.GetComponent <MihoControll>();
 }
    private MihoControll playerControl;         // Reference to the player control script.
    //private int previousScore = 0;			// The score in the previous frame.


    void Awake()
    {
        // Setting up the reference.
        playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent <MihoControll>();
    }