Ejemplo n.º 1
0
        // Use this for initialization
        protected void Start()
        {
            activeCharacters = new List <MainCharacter>();
            playersCount++;
            coinController = new CharacterCoinController();
            levelGenerator = GameObject.FindObjectOfType <LevelGenerator>();
            input          = InputFactory.GetInput(playersCount, mobileInput);
            character      = GetComponentInParent <MainCharacter>();
            activeCharacters.Add(character);

            //FIXME wtf
            cameraController = character.GetComponentInChildren <CharacterCameraController>();
        }
Ejemplo n.º 2
0
        public void SetLevelCompleted()
        {
            if (levelCompleted)
            {
                return;
            }

            levelCompleted = true;

            autoWalkLength = PathLengthInLevelEnd;

            Destroy(cameraController);

            input.Destroy();

            input            = null;
            cameraController = null;

            activeCharacters.Remove(character);
        }