Example #1
0
    protected override void setupMonsterToStartAttack()
    {
        //Door
        doorOpenDuration = Random.Range(3, 5);

        //Seconds for user to close the door
        secondsBeforeUserLose = Random.Range(minSecondsForUserToCloseDoor, maxSecondsForUserToCloseDoor);

        //Disappearing bathroom monster disapearrance
        disappearDestination   = transform.position;
        disappearDestination.y = -2;

        door.setDoorAngleWithDuration(door.openDoorAngle, doorOpenDuration);
        //AUDIO
        AudioController.instance.PLAY(AudioController.instance.AUDIO.DoorOpen, TYPE.MONSTER);
        StartCoroutine("playDoorCreak");
    }
 void doorOpen()
 {
     door.setDoorAngleWithDuration(openDoorAngle, timeForDoorToOpen);
     //AUDIO
     AudioController.instance.PLAY(AudioController.instance.AUDIO.DoorCreak, TYPE.MONSTER);
     currentStage = MonsterStages.JumpScare;
     //only deactive mesh
     setModelActive(false);
 }