// Use this for initialization public virtual void Start() { controls = GetComponent <CharacterController> (); player = GameObject.Find("player"); world = player.GetComponent<World>(); playerScript = player.GetComponent<IceBerg>(); }
// Update is called once per frame void OnGUI() { alpha -= 0.2f*Time.deltaTime; alpha = Mathf.Clamp01 (alpha); GUI.color = new Color(0,0,0, alpha); GUI.depth = drawDepth; GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height), black); if (alpha < 0.001f) { if (first) { ice = GetComponent<IceBerg>(); ice.enabled = true; } alpha = 1f; this.enabled = false; } }
// Use this for initialization void Start() { game.level = 0; game.typeAI = 2; spawnRestrictionBox.x = 135.0f; spawnRestrictionBox.y = 57.0f; player = GetComponent<IceBerg>(); startLevel(); dayPOS.x = 0; daySIZ.x = 592f; daySIZ.y = 86f; dayPOS.y = Screen.height-daySIZ.y; levelPOS.y = Screen.height-86f+5f; levelPOS.x = 310f; levelSIZ.x = 200f; levelSIZ.y = 80f; offset.x = 3f; offset.y = 3f; }