public void Awake()
    {
        playerObject     = GameObject.FindGameObjectWithTag("Player");
        playerController = playerObject.GetComponent <PlayerController>();
        playerStartPos   = playerObject.transform.position;

        tutorialUI = this.GetComponent <TutorialUIScript>();

        this.key_moveUp    = playerController.key_moveUp;
        this.key_moveDown  = playerController.key_moveDown;
        this.key_moveRight = playerController.key_moveRight;
        this.key_moveLeft  = playerController.key_moveLeft;

        this.key_colorOne   = playerController.key_colorOne;
        this.key_colorTwo   = playerController.key_colorTwo;
        this.key_colorThree = playerController.key_colorThree;

        this.key_shoot       = playerController.key_shoot;
        this.key_cancelColor = playerController.key_cancelColor;

        spawnPoint     = GameObject.FindGameObjectWithTag("ObjectSpawner").transform;
        offScreenPoint = GameObject.FindGameObjectWithTag("Offscreen").transform;
        backgrounds    = GameObject.FindGameObjectsWithTag("Background");
        tutorialUI.ChangeActive(tutorialUI.moveSprites, false);

        topSpawn    = new Vector2(spawnPoint.position.x, spawnPoint.position.y + spawnHeightDifference);
        bottomSpawn = new Vector2(spawnPoint.position.x, spawnPoint.position.y - spawnHeightDifference);

        StartCoroutine("EventMinusOne");
    }
    // Start is called before the first frame update
    void Start()
    {
        LockViewScript = PlayerCamera.GetComponent <LockView>();
        doorScript     = door.GetComponent <DoorScript>();

        TellPlayerToFindTheBathroom = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Vanessa/TellPlayerToFindTheBathroom");
        ITriedToFindTheBathroom     = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Player/ITriedToFindTheBathroom");
        HeDoesntKnowEnglish         = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Vanessa/AskIfSheKnowsWordForBathroom");

        dialogueWithGroundskeeperScript = groundskeeper.GetComponent <DialogueWithGroundskeeper>();

        forceBathroomPuzzleDialogueScript = gameObject.GetComponent <ForceBathroomPuzzleDialogue>();

        tutorialUIScript = TutorialUIHolder.GetComponent <TutorialUIScript>();

        CameraShakeScript = PlayerCamera.GetComponent <CameraShake>();

        IDontWantThat = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Vanessa/IDontWantThat");

        baseLightningSound = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/Lightning");
    }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     _ui = GameObject.Find("Tutorial Dialog").GetComponent <TutorialUIScript>();
 }