void InitializeDrawingMeter() { GameObject g = null; if (PhotonNetwork.connected && PhotonNetwork.isMasterClient) { g = Instantiate(drawing_meter_prefab, new Vector3(0f, 9.65f, 0), Quaternion.Euler(0, 0, 180)) as GameObject; } else { g = Instantiate(drawing_meter_prefab, new Vector3(-5.6f, -9.65f, 0), Quaternion.identity) as GameObject; } TouchDetection tdt = GameObject.FindObjectOfType <TouchDetection>(); tdt.RegisterPowerupMeter(g.GetComponentInChildren <DrawingMeter>()); }
// Use this for initialization void Start() { audio_source = GetComponent <AudioSource>(); audio_source.clip = click_clip; touch_detection = GameObject.FindObjectOfType <TouchDetection>(); gesture_detector = GameObject.FindObjectOfType <GestureDetector>(); game_manager = GameObject.FindObjectOfType <GlassGameManager>(); touch_detection.DisableForNextGesture(true); gesture_detector.DisableTemporarily(true); guide_text = guide_text_object.GetComponent <Text>(); guide_text.color = new Color(guide_text.color.r, guide_text.color.g, guide_text.color.b, 0); guide_text.text = "Let's learn some basic control"; state = State.fading_in; stage = Stage.basic_control; stage_elapsed = stage_interval; next_button.SetActive(false); }
// Use this for initialization void Start() { audio_source = GetComponent <AudioSource>(); audio_source.clip = click_clip; touch_detection = GameObject.FindObjectOfType <TouchDetection>(); gesture_detector = GameObject.FindObjectOfType <GestureDetector>(); game_manager = GameObject.FindObjectOfType <GlassGameManager>(); powerup_manager = GameObject.FindObjectOfType <PowerUpManager>(); sprite_renderer = GetComponentInChildren <SpriteRenderer>(); powerup_meter = GameObject.FindObjectOfType <PowerupMeter>(); touch_detection.DisableForNextGesture(true); gesture_detector.DisableTemporarily(true); guide_text = guide_text_object.GetComponent <Text>(); guide_text.color = new Color(guide_text.color.r, guide_text.color.g, guide_text.color.b, 0); guide_text.text = "Let's learn about Power Up"; state = State.fading_in; stage = Stage.intro; stage_elapsed = stage_interval; next_button.SetActive(false); quit_button.SetActive(false); touch_detection.DisableForNextGesture(true); powerup_manager.DisableAllPowerUp(); sprite_renderer.enabled = false; // Fast jump for test mode //stage = Stage.supercharge_intro_3; //state = State.fading_out; //game_manager.InitializeBreakshot(); //game_manager.InitializePowerUpSpawner(); //touch_detection.DisableForNextGesture(false); //gesture_detector.DisableTemporarily(false); //PowerUpSpawner powerup_spawner = GameObject.FindObjectOfType<PowerUpSpawner>(); //powerup_spawner.enabled = false; //foreach (PowerupCalculator puc in GameObject.FindObjectsOfType<PowerupCalculator>()) { // Destroy(puc.gameObject); //} }