void OnTriggerEnter2D(Collider2D other) { if (dead_flg == 1) { return; } if (other.gameObject.tag == "TAG_ENEMY") { Instantiate(pf_baku, this.transform.position, Quaternion.identity); other.gameObject.SendMessage("damage", 1); GG.sound_play("SE_2"); Destroy(this.gameObject); } if (other.gameObject.tag == "TAG_BLOCK") { GG.sound_play("SE_2"); Instantiate(pf_baku, this.transform.position, Quaternion.identity); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (dead_flg == 1) { return; } if (other.gameObject.tag == "TAG_ENEMY") { if (hitobj.Contains(other.gameObject)) { } else { hitobj.Add(other.gameObject); Instantiate(pf_baku, this.transform.position, Quaternion.identity); other.gameObject.SendMessage("damage", 3); GG.sound_play("SE_1"); } } if (other.gameObject.tag == "TAG_BLOCK") { GG.sound_play("SE_BAKU"); Instantiate(pf_baku, other.transform.position, Quaternion.identity); Destroy(other.gameObject); Destroy(this.gameObject); dead_flg = 1; } }
void GameInit() { pause_button_set(true); pause_menu_set(false); GG.pause = 0; soundsound.OnPitchSliderChanged(0); howto_init(); GO_ItemWindow.gameObject.SendMessage("window_item_set", -1); GG.window_item = 0; GG.minislime_z_cnt = 0.0f; GG.shield_z_cnt = 0.0f; clear_out(); GG.GameMode = GG.GAMEMODE_GAME; GG.item_cnt = 0; put_game_score(); put_game_hiscore(); put_text_stage(); enemyset(GG.stage); GG.sound_play("BGM_GAME"); float px = -3.28f; float py = -7.2f; for (int i = 0; i < 11; i++) { zikiset(px, py + UnityEngine.Random.Range(-0.08f, 0.08f)); px += 0.64f; } howto_call(); }
public void volume_slider_set() { float vol = slider_volume.value; GG.SoundVolume = vol; soundsound.volumeset(vol); GG.sound_play("SE_SWITCH1"); }
void game2visual() { soundsound.OnPitchSliderChanged(0); GG.sound_play("SE_WIN"); game_obj_all_kill(); clear_start(); }
public void push_title_ranking() { if (title_push_button == 1) { GG.sound_play("SE_BUTTON"); score_ranking_start(GG.hiscore); } }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "TAG_ENESHOT") { GG.sound_play("SE_H"); lifetime = 1; Destroy(other.gameObject); } }
public void push_start_button() { //スタートボタン if (title_push_button == 1) { GG.sound_play("SE_START"); title_push_button = 0; title_move_up(); } }
void OnTriggerEnter2D(Collider2D other) { if (GG.GameMode != GG.GAMEMODE_GAME) { return; } if (damage_muteki_time > 0) { return; } if (dead_flg == 1) { return; } if ((other.gameObject.tag == "TAG_ENEMY") || (other.gameObject.tag == "TAG_ENESHOT")) { GG.sound_play("SE_MISS"); if (GG.debug_muteki_mode == 0) { HP--; } Destroy(other.gameObject); if (HP <= 0) { dead_flg = 1; GO_gameMgr.gameObject.SendMessage("alldeadcheck", 1); Destroy(this.gameObject); } else { damage_muteki_time = 60; } } if (other.gameObject.tag == "TAG_MOVEITEM") { int itemnum = other.GetComponent <MoveItem>().get_itemkind(); shot_kind = itemnum; shot_tokushu_timer = 120; other.GetComponent <MoveItem>().kieru(); Instantiate(pf_Hikari_ItemGet, transform.position, Quaternion.identity); shot_timer = 60; } }
public void push_title_right() { if (title_push_button != 1) { return; } if (GG.stage < GG.stage_max) { GG.stage++; GG.sound_play("SE_SWITCH1"); title_stage_put(); } }
public void push_title_left() { if (title_push_button != 1) { return; } if (GG.stage > 1) { GG.stage--; GG.sound_play("SE_SWITCH1"); title_stage_put(); } }
public void push_clear_button_next() { GG.sound_play("SE_SWITCH1"); GG.stage++; if (GG.stage == (GG.stage_max + 1)) { GG.stage = 1; //タイトルに戻ったときの表示に使うので1にする clear_out(); boardstart(); } else { GameInit(); } }
public void OnPointerEnter(PointerEventData eventData) { if (GG.pause == 1) { return; } if (damage_muteki_time > 0) { return; } GG.sound_play("SE_SWITCH1"); if (GG.window_item != 0) { Vector3 pos = GO_ItemWindow.gameObject.transform.position; GameObject getsc = (GameObject)Instantiate(pf_MoveItem, pos, Quaternion.identity); getsc.GetComponent <MoveItem>().set_start_goal(GG.window_item - 1, this.gameObject); GO_ItemWindow.gameObject.SendMessage("window_item_set", -1); GG.window_item = 0; } Vector3 shieldpos = transform.position; shieldpos.y += 0.24f; shieldpos.z = GG.shield_z_cnt; GG.shield_z_cnt += 0.001f; Instantiate(pf_shield, shieldpos, Quaternion.identity); shot_timer = 60; Instantiate(pf_tap_hikari, transform.position, Quaternion.identity); }
public void damage(int dam = 1) { if (dead_flg == 1) { return; } { HP -= dam; if ((0 < boss_num) && (boss_num < 100)) { GG.boss_hp -= dam; if (GG.boss_hp < 0) { GG.boss_hp = 0; GO_gameMgr.gameObject.SendMessage("boss_hp_gage_off", 1); } else { GO_gameMgr.gameObject.SendMessage("boss_hp_gage_put", 1); } } else { if (hansha_flg != 0) { GameObject obj_eneshot = (GameObject)Instantiate(pf_eneshot_hansha, transform.position, Quaternion.identity); obj_eneshot.GetComponent <EneShot>().set_kakudo(270, 0.1f); } } if (HP <= 0) { dead_flg = 1; GG.sound_play("SE_BAKU"); Vector3 ppp = GO_my.transform.position; if ((0 < boss_num) && (boss_num < 100)) { Instantiate(pf_bossbaku, ppp, Quaternion.identity); GO_gameMgr.gameObject.SendMessage("game_clear", 1); setscore_put(SCORE); GO_gameMgr.gameObject.SendMessage("score_add", SCORE); } else { Instantiate(pf_baku, ppp, Quaternion.identity); } int plus_score = SCORE * GG.combo_counter; if (plus_score > 100) { plus_score = 100; } int plus_exp = EXP; GG.combo_counter++; setscore_put(plus_score); GO_gameMgr.gameObject.SendMessage("score_add", plus_score); GO_gameMgr.gameObject.SendMessage("exp_add", plus_exp); GG.item_cnt++; if (GG.item_cnt >= 20) { GG.item_cnt = 0; GameObject obj_takara = (GameObject)Instantiate(pf_item, ppp, Quaternion.identity); obj_takara.GetComponent <Item>().item_kind_set(get_item_num()); } if (utikaesi != 0) { GameObject obj_eneshot = (GameObject)Instantiate(pf_eneshot_hansha, transform.position, Quaternion.identity); obj_eneshot.GetComponent <EneShot>().set_kakudo(997, 0.05f); } Destroy(this.gameObject); return; } else { GG.sound_play("SE_H"); } } }
void push_option_button_move_completed() { soundsound.OnPitchSliderChanged(0); GG.sound_play("BGM_GAME"); }