Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        fade = GameObject.Find("DeathFade").GetComponent <DeathFade>();
        StartCoroutine(CameraMovement());


        audioManager.volume = audioManager.volume * (GameObject.Find("Game Manager").GetComponent <MenuScript>().Volume / GameObject.Find("Game Manager").GetComponent <MenuScript>().MaxVolume);
    }
Exemple #2
0
    void Start()
    {
        controller = GetComponent <Controller2D>();
        deathFade  = GetComponent <DeathFade>();
        //camEffects = GetComponent<CameraEffects>();

        gravity         = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
        minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight);

        jumping            = onLeftWall = onRightWall = applyJumpQueue = false;
        canUseJumpPlatform = canMove = true;
    }
Exemple #3
0
    void Start()
    {
        controller = GetComponent <Controller2D>();
        deathFade  = GetComponent <DeathFade>();
        camEffects = GetComponent <CameraEffects>();

        gravity         = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
        minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight);

        jumping = onLeftWall = onRightWall = applyJumpQueue = false;

        transform.position = gameManager.currentReSpawnPoint.transform.position;
    }
Exemple #4
0
 void Start()
 {
     SceneCount = SceneManager.sceneCountInBuildSettings;
     Player     = GameObject.Find("Player").GetComponent <PlatformerController>();
     fade       = GameObject.Find("DeathFade").GetComponent <DeathFade>();
 }
Exemple #5
0
 // Start is called before the first frame update
 void Start()
 {
     fade = GameObject.Find("DeathFade").GetComponent <DeathFade>();
     StartCoroutine(CountDown());
 }