Exemplo n.º 1
0
        private void Awake()
        {
            // Setting up references.
            characterAnimator = GetComponent <Animator>();
            rigidBody2D       = GetComponent <Rigidbody2D>();
            audioSource       = GetComponent <AudioSource>();
            startPosition     = transform.position;

            timeManager  = GameObject.Find("Main Camera").GetComponent <TimeManager>();
            boostRespawn = GameObject.Find("BoostSpawner").GetComponent <BoostRespawn>();
        }
Exemplo n.º 2
0
        private void Awake()
        {
            // Setting up references.
            m_GroundCheck  = transform.Find("GroundCheck");
            m_LeftCheck    = transform.Find("GroundCheck (1)");
            m_RightCheck   = transform.Find("GroundCheck (2)");
            m_CeilingCheck = transform.Find("CeilingCheck");

            m_Anim        = GetComponent <Animator>();
            m_Rigidbody2D = GetComponent <Rigidbody2D>();
            audioSource   = GetComponent <AudioSource>();
            startPosition = transform.position;

            timeManager  = GameObject.Find("Main Camera").GetComponent <TimeManager>();
            boostRespawn = GameObject.Find("BoostSpawner").GetComponent <BoostRespawn>();
        }
Exemplo n.º 3
0
 // Upon initialize of the level, load the instance and spawn the first set of boosts
 void Start()
 {
     Instance = this;
     SpawnBoost();
 }