Beispiel #1
0
        public override void Start()
        {
            foreach (var rocket in Rockets)
            {
                rocket.SetActive(false);
            }

            var RocketLevel = Services.SplitService.GetLevel();

            Rockets[RocketLevel - 1].SetActive(true);

            controller = GetComponent <CharacterController> ();
            controller.detectCollisions = false;

            animator = GetComponentInParent <Animator> ();
            rb       = GetComponent <Rigidbody> ();

            //cam = Camera.main.transform;
            gm = FindObjectOfType <SplitLinerGameManager>();
            am = FindObjectOfType <SplitLinerAudioManager>();
            explosionParticles = Instantiate(explosionPrefab).GetComponent <ParticleSystem> ();
            explosionAudio     = explosionParticles.GetComponent <AudioSource> ();
            explosionParticles.gameObject.SetActive(false);
            isLookedAt = false;
        }
Beispiel #2
0
        public override void Start()
        {
            motor = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMotor> ();
            sm    = GameObject.FindGameObjectWithTag("SM").GetComponent <SpawnManager> ();
            am    = FindObjectOfType <SplitLinerAudioManager>();

            highScore = PlayerPrefs.GetInt(kSaveKey);
            tempScore = highScore;

            if (highScore == 0)
            {
                tempScore = 1;
            }

            currentAmount = startingAmount;
        }