// Use this for initialization void Start() { timeLeft = doorTimeOpen; door = doorToToggle.GetComponent <Door_Animation>(); if (timer == null || timerAnim == null) { Debug.LogError("No Timer"); return; } this.animator = GameObject.Find("Timer").GetComponent <Animator>(); /*if (doorTimeOpen != 1) { * * int j = 0; * for (float i = doorTimeOpen - 1.0f; i > 0.0f; i = i - 1.0f) { * * j++; * if (j > 10) { * speed -= 0.01f; * } else { * speed -= 0.1f; * } * } * }*/ this.animator.speed = 1f / doorTimeOpen; timer.SetActive(false); }
// Use this for initialization void Start() { control_plane_a = GameObject.Find("button_d"); control_plane_b = GameObject.Find("button_c"); spawn_object_holder = GameObject.Find("player_spawn"); anima = GameObject.Find("Spawn_Point_v2"); parkPosition = GameObject.Find("ParkPosition"); furz_partikel.gameObject.SetActive(false); char_animation_script = charakter_controller.GetComponent <charakter_animation_manager>(); char_animation_script.current_state = charakter_animation_manager.animation_type.idle2; anima_script = anima.GetComponent <Door_Animation>(); anima_script.spawn(); gravity_boots_manager_script = gravity_boots_manager.GetComponent <gravity_boots_manager>(); }