void Awake() { elapsed_time_ = EVENT_TIME; changebounce = GetComponentsInChildren<ChangeBounce>(); is_magic_ = IsMagic.UNUSED_MAGIC; origin_camera_rotation_ = Camera.main.transform.rotation; start_text_ = GameObject.Find("BounceText").GetComponent<Text>(); start_text_.enabled = false; start_time_ = START_EVENT_TIME; start_text_position_ = start_text_.rectTransform.localPosition; }
void Awake() { elapsed_time_ = EVENT_TIME; changebounce = GetComponentsInChildren <ChangeBounce>(); is_magic_ = IsMagic.UNUSED_MAGIC; origin_camera_rotation_ = Camera.main.transform.rotation; bounce_telop_ = GameObject.Find("BundoTelopImage").GetComponent <Image>(); bounce_telop_.enabled = false; Debug.Log(bounce_telop_.enabled); start_time_ = START_EVENT_TIME; bounce_telop_position_ = bounce_telop_.rectTransform.localPosition; }
void Awake() { elapsed_time_ = EVENT_TIME; changebounce = GetComponentsInChildren<ChangeBounce>(); is_magic_ = IsMagic.UNUSED_MAGIC; origin_camera_rotation_ = Camera.main.transform.rotation; bounce_telop_ = GameObject.Find("BundoTelopImage").GetComponent<Image>(); bounce_telop_.enabled = false; Debug.Log(bounce_telop_.enabled); start_time_ = START_EVENT_TIME; bounce_telop_position_ = bounce_telop_.rectTransform.localPosition; }
void Start() { if (!MyNetworkLobbyManager.s_singleton.IsTutorial) { if (!isLocalPlayer) { return; } } fruit_manager_ = FindObjectOfType <FruitCreater>().gameObject; effect_time_ = EFFECT_TIME_MAX_; elapsed_time_ = MAGIC_TIME_; ismagic_ = IsMagic.UNUSED_MAGIC; start_create_max_ = 100; hand_controller_ = GameObject.Find("LeapHandController").GetComponent <HandController>(); magic_scale_change_ = fruit_manager_.GetComponentsInChildren <MagicScaleChange>(); if (SCALE_CHANGE_TIME_ >= MAGIC_TIME_) { SCALE_CHANGE_TIME_ = MAGIC_TIME_ / 2; } }
public void RpcTellClientSmallFruitStart() { ismagic_ = IsMagic.EffECT_START; }
void SmallChangeMagic() { switch (ismagic_) { case IsMagic.UNUSED_MAGIC: { if (Input.GetKeyDown(KeyCode.A)) { ismagic_ = IsMagic.EffECT_START; } if (ismagic_ == IsMagic.EffECT_START) { GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); explosion_effecct = Instantiate(explosion_effect_particle_); explosion_effecct.transform.SetParent(particle_manager_.transform); explosion_effecct.name = explosion_effect_particle_.name; } } break; case IsMagic.EffECT_START: { if (effect_time_ >= EFFECT_TIME_MAX_) { AudioManager.Instance.PlaySe(10); GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); explosion_effecct = Instantiate(explosion_effect_particle_); explosion_effecct.transform.SetParent(particle_manager_.transform); explosion_effecct.name = explosion_effect_particle_.name; } Vector3 fall = explosion_effecct.transform.position; if (fall.y >= 4.5f) { fall.y -= 0.08f; explosion_effecct.transform.position = fall; } effect_time_ -= Time.deltaTime; if (effect_time_ <= 0) { magic_scale_change_ = fruit_manager_.GetComponentsInChildren <MagicScaleChange>(); for (int i = 0; i < magic_scale_change_.Length; ++i) { GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); magic_start_effect = Instantiate(magic_start_effect_particle_); magic_start_effect.transform.SetParent(particle_manager_.transform); magic_start_effect.transform.position = magic_scale_change_[i].transform.position; magic_start_effect.name = magic_start_effect_particle_.name; smoke_effect_destroy_ = particle_manager_.GetComponentsInChildren <SmokeEffectDestroy>(); magic_scale_change_[i].ScaleChange(true, SCALE_MIN_, SCALE_CHANGE_TIME_); smoke_effect_destroy_[i].SmokeDestroy(true); } ismagic_ = IsMagic.MAGIC_START; } } break; case IsMagic.MAGIC_START: { elapsed_time_ -= Time.deltaTime; Debug.Log(elapsed_time_); if (elapsed_time_ <= SCALE_CHANGE_TIME_) { ismagic_ = IsMagic.MAGIC_END; } } break; case IsMagic.MAGIC_END: { magic_scale_change_ = fruit_manager_.GetComponentsInChildren <MagicScaleChange>(); for (int i = 0; i < magic_scale_change_.Length; ++i) { magic_scale_change_[i].ScaleChange(false, SCALE_MIN_, SCALE_CHANGE_TIME_); } ismagic_ = IsMagic.UNUSED_MAGIC; elapsed_time_ = MAGIC_TIME_; effect_time_ = EFFECT_TIME_MAX_; GameObject effect_destroy = GameObject.Find("FireBall"); Destroy(effect_destroy); } break; } }
void BounceSwitching() { switch (is_magic_) { case IsMagic.UNUSED_MAGIC: { if (Input.GetKeyDown(KeyCode.C)) { is_magic_ = IsMagic.MAGIC_START; } if (is_magic_ == IsMagic.MAGIC_START) { bounce_telop_.enabled = true; changebounce = GetComponentsInChildren <ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(true, BOUNCE_POWER); } } } break; case IsMagic.MAGIC_START: { if (start_time_ >= 3.0f) { AudioManager.Instance.PlaySe(12); bounce_telop_.enabled = true; changebounce = GetComponentsInChildren <ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(true, BOUNCE_POWER); } } if (start_time_ >= 0) { Vector3 flow_telop_ = bounce_telop_.rectTransform.localPosition; flow_telop_.x -= FLOW_TELOP_SPEED; bounce_telop_.rectTransform.localPosition = flow_telop_; start_time_ -= Time.deltaTime; Quaternion main_camera_rotation = Camera.main.transform.rotation; float vibration_x = Random.Range(-SWAY_POWER, SWAY_POWER); float vibration_y = Random.Range(-SWAY_POWER, SWAY_POWER); main_camera_rotation.x = origin_camera_rotation_.x + vibration_x; main_camera_rotation.y = origin_camera_rotation_.y + vibration_y; Camera.main.transform.rotation = main_camera_rotation; } if (elapsed_time_ <= 9.0f) { bounce_telop_.enabled = false; bounce_telop_.rectTransform.localPosition = bounce_telop_position_; Debug.Log(bounce_telop_.rectTransform.localPosition); } if (start_time_ <= 0) { Camera.main.transform.rotation = origin_camera_rotation_; start_time_ = 0; elapsed_time_ -= Time.deltaTime; } if (elapsed_time_ <= 0) { start_time_ = START_EVENT_TIME; is_magic_ = IsMagic.MAGIC_END; } } break; case IsMagic.MAGIC_END: { changebounce = GetComponentsInChildren <ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(false, BOUNCE_POWER); } is_magic_ = IsMagic.UNUSED_MAGIC; elapsed_time_ = EVENT_TIME; } break; } }
public void Starter() { is_magic_ = IsMagic.MAGIC_START; }
void BounceSwitching() { switch (is_magic_) { case IsMagic.UNUSED_MAGIC: { if (Input.GetKeyDown(KeyCode.E)) { is_magic_ = IsMagic.MAGIC_START; } if (is_magic_ == IsMagic.MAGIC_START) { start_text_.enabled = true; changebounce = GetComponentsInChildren<ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(true, BOUNCE_POWER); } } } break; case IsMagic.MAGIC_START: { if (start_time_ >= 3.0f) { AudioManager.Instance.PlaySe(12); start_text_.enabled = true; changebounce = GetComponentsInChildren<ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(true, BOUNCE_POWER); } } if (start_time_ >= 0 ) { Vector3 flow_telop_ = start_text_.rectTransform.localPosition; flow_telop_.x -= FLOW_TELOP_SPEED; start_text_.rectTransform.localPosition = flow_telop_; start_time_ -= Time.deltaTime; Quaternion main_camera_rotation = Camera.main.transform.rotation; float vibration_x = Random.Range(-SWAY_POWER, SWAY_POWER); float vibration_y = Random.Range(-SWAY_POWER, SWAY_POWER); main_camera_rotation.x = origin_camera_rotation_.x + vibration_x; main_camera_rotation.y = origin_camera_rotation_.y + vibration_y; Camera.main.transform.rotation = main_camera_rotation; } if(elapsed_time_ <= 9.0f) { start_text_.enabled = false; start_text_.rectTransform.localPosition = start_text_position_; } if(start_time_ <= 0) { Camera.main.transform.rotation = origin_camera_rotation_; start_time_ = 0; elapsed_time_ -= Time.deltaTime; } if (elapsed_time_ <= 0) { start_time_ = START_EVENT_TIME; is_magic_ = IsMagic.MAGIC_END; } } break; case IsMagic.MAGIC_END: { changebounce = GetComponentsInChildren<ChangeBounce>(); for (int i = 0; i < changebounce.Length; ++i) { changebounce[i].Bounce(false, BOUNCE_POWER); } is_magic_ = IsMagic.UNUSED_MAGIC; elapsed_time_ = EVENT_TIME; } break; } }
public void Starter() { is_magic_ = IsMagic.MAGIC_START; }
void SmallChangeMagic() { switch (ismagic_) { case IsMagic.UNUSED_MAGIC: { if (Input.GetKeyDown(KeyCode.A)) { ismagic_ = IsMagic.EffECT_START; } if(ismagic_ == IsMagic.EffECT_START) { GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); explosion_effecct = Instantiate(explosion_effect_particle_); explosion_effecct.transform.SetParent(particle_manager_.transform); explosion_effecct.name = explosion_effect_particle_.name; } } break; case IsMagic.EffECT_START: { if (effect_time_ >= EFFECT_TIME_MAX_) { AudioManager.Instance.PlaySe(10); GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); explosion_effecct = Instantiate(explosion_effect_particle_); explosion_effecct.transform.SetParent(particle_manager_.transform); explosion_effecct.name = explosion_effect_particle_.name; } Vector3 fall = explosion_effecct.transform.position; if (fall.y >= 4.5f) { fall.y -= 0.08f; explosion_effecct.transform.position = fall; } effect_time_ -= Time.deltaTime; if (effect_time_ <= 0) { magic_scale_change_ = fruit_manager_.GetComponentsInChildren<MagicScaleChange>(); for (int i = 0; i < magic_scale_change_.Length; ++i) { GameObject particle_manager_ = GameObject.Find("Ike3ParticleManager"); magic_start_effect = Instantiate(magic_start_effect_particle_); magic_start_effect.transform.SetParent(particle_manager_.transform); magic_start_effect.transform.position = magic_scale_change_[i].transform.position; magic_start_effect.name = magic_start_effect_particle_.name; smoke_effect_destroy_ = particle_manager_.GetComponentsInChildren<SmokeEffectDestroy>(); magic_scale_change_[i].ScaleChange(true, SCALE_MIN_, SCALE_CHANGE_TIME_); smoke_effect_destroy_[i].SmokeDestroy(true); } ismagic_ = IsMagic.MAGIC_START; } } break; case IsMagic.MAGIC_START: { elapsed_time_ -= Time.deltaTime; Debug.Log(elapsed_time_); if (elapsed_time_ <= SCALE_CHANGE_TIME_) { ismagic_ = IsMagic.MAGIC_END; } } break; case IsMagic.MAGIC_END: { magic_scale_change_ = fruit_manager_.GetComponentsInChildren<MagicScaleChange>(); for (int i = 0; i < magic_scale_change_.Length; ++i) { magic_scale_change_[i].ScaleChange(false, SCALE_MIN_, SCALE_CHANGE_TIME_); } ismagic_ = IsMagic.UNUSED_MAGIC; elapsed_time_ = MAGIC_TIME_; effect_time_ = EFFECT_TIME_MAX_; GameObject effect_destroy = GameObject.Find("FireBall"); Destroy(effect_destroy); } break; } }
public void RpcTellClientSmallFruitStart() { ismagic_ = IsMagic.EffECT_START; }
void Start() { if (!MyNetworkLobbyManager.s_singleton.IsTutorial) { if (!isLocalPlayer) return; } fruit_manager_ = FindObjectOfType<FruitCreater>().gameObject; effect_time_ = EFFECT_TIME_MAX_; elapsed_time_ = MAGIC_TIME_; ismagic_ = IsMagic.UNUSED_MAGIC; start_create_max_ = 100; hand_controller_ = GameObject.Find("LeapHandController").GetComponent<HandController>(); magic_scale_change_ = fruit_manager_.GetComponentsInChildren<MagicScaleChange>(); if (SCALE_CHANGE_TIME_ >= MAGIC_TIME_) { SCALE_CHANGE_TIME_ = MAGIC_TIME_ / 2; } }