Vector2?SearchShotPoint() { foreach (var i in G20_HitObjectCabinet.GetInstance().AssitObjectList) { if (!i.GetComponent <Collider>().enabled) { continue; } if (IsEnemy(i.gameObject)) { if (CanShootEnemy(i.gameObject)) { var pos = Camera.main.WorldToScreenPoint(i.transform.position); if (InScreenRange(pos)) { return(pos); } } } else if (G20_EnemyCabinet.GetInstance().enemyCount < param[paramNumber].priorityEnemyCount) { var pos = Camera.main.WorldToScreenPoint(i.transform.position); if (InScreenRange(pos)) { return(pos); } } } return(null); }
public override void Execute(Vector3 hit_point) { Camera.main.GetComponent <G20_CameraShake>().Shake(G20_CameraShakeType.DOWNWARD, 0.4f, 20f, 1.4f); G20_FernPerformer.GetInstance().Shake(); G20_EnemyCabinet.GetInstance().ExplodeCapsuleRange( transform.position + new Vector3(0, -5, 0), transform.position + new Vector3(0, 5, 0), explosionRadius); Destroy(gameObject); }
public G20_Enemy EnemyPop(G20_EnemyType enemyType, Vector3 position, G20_EnemyPopType popType = G20_EnemyPopType.RISE_UP) { // 敵のオブジェクト生成 var ene = popEnemySelector.GetPopEnemy(enemyType); ene.transform.SetParent(transform.parent); G20_SEManager.GetInstance().Play(G20_SEType.SUMMON_APPLE, position + new Vector3(0, 0.02f, 0)); // 出現演出 switch (popType) { case G20_EnemyPopType.RISE_UP: //敵の召喚エフェクト生成(少し魔法陣を浮かす) G20_EffectManager.GetInstance().Create(G20_EffectType.SUMMON_APPLE, position + new Vector3(0, 0.02f, 0)); ene.transform.position = position + new Vector3(0, riseUpDifY, 0); StartCoroutine(RiseUp(ene)); break; case G20_EnemyPopType.WALK_FORWARD: G20_EffectManager.GetInstance().Create(G20_EffectType.SUMMON_APPLE_VERT, position); position.y = 0f; ene.transform.position = position + new Vector3(0, 0, walkForwardDifZ); StartCoroutine(WalkForward(ene)); break; } var enemy = ene.GetComponent <G20_Enemy>(); //enemyのbuffを設定 G20_EnemyBuff enemy_buff = null; if (onPopSpeedBuffValue != 0) { enemy_buff = new G20_SpeedBuff(enemy, 100.0f, onPopSpeedBuffValue); } if (enemy_buff != null) { enemy.AddBuff(enemy_buff); } // 敵情報保存 G20_EnemyCabinet.GetInstance().RegisterEnemy(enemy); //敵情報破棄を敵が死んだときに実行 enemy.OnDestroyAction += G20_EnemyCabinet.GetInstance().UnregisterEnemy; return(enemy); }
public void GameClear() { IsGesslerBattle = false; gameState = G20_GameState.CLEAR; //gameRootAnim.enabled = true; //gameRootAnim.CrossFade("ToClear", 0.1f); //StartCoroutine(RootAnimOff(2f)); // 敵(残ってれば)全滅 G20_EnemyCabinet.GetInstance().KillAllEnemys(); G20_ScoreApplePopper.GetInstance().DeleteAllScoreApples(); G20_BGMManager.GetInstance().FadeOut(); G20_BulletShooter.GetInstance().coutingHitRate = false; // クリア演出の開始 G20_ClearPerformer.GetInstance().Excute(GameEnd); }
// 空中から出現する // Use this for initialization void Start() { timer = stageTotalTime; enemyPopper = G20_ComponentUtility.FindComponentOnScene <G20_EnemyPopper>(); enemyCabinet = G20_EnemyCabinet.GetInstance(); // ポップ位置情報の確保 popPositions = enemyPopper.transform.GetComponentsInChildren <G20_EnemyPopPosition>(); Array.Sort(popPositions, (a, b) => a.number - b.number); gameManager = G20_GameManager.GetInstance(); scoreAppleCanPopTimeMin = stageTotalTime * 0.1f; SequenceEnter(); }
IEnumerator ToIngameCoroutine() { // 演出中は弾の判定なし G20_BulletShooter.GetInstance().CanShoot = false; titleCanvas.SetActive(false); G20_BGMManager.GetInstance().FadeOut(); var seForest = G20_SEManager.GetInstance().Play(G20_SEType.FOREST, Vector3.zero, false); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 1f)); //playerObj.GetComponent<Animator>().SetBool("zoomout", true); // 環境光は別のコルーチンで遷移 StartCoroutine(LightSettingCoroutine()); // プレイヤー後ずさり等のアニメーション開始 gameRootAnim.CrossFade("ToIngame", 0f); yield return(new WaitForSeconds(5.5f)); summonParticle.Play(); yield return(new WaitForSeconds(0.7f)); paramCanvas.SetActive(true); summonParticle.Stop(); gesslerAnim.enabled = true; gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Attack); yield return(new WaitForSeconds(0.9f)); yield return(new WaitForSeconds(0.6f)); gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Taiki); // ゲスラーふわふわアニメーション開始 // 最初のリンゴ召喚 G20_StageManager.GetInstance().IngameStart(); G20_StageManager.GetInstance().nowStageBehaviour.SetEnableUpdateCall(1); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 1.5f)); // セリフ再生と字幕表示 //G20_VoicePerformer.GetInstance().Play(0); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 0.5f)); gameRootAnim.enabled = false; gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Taiki); // 戦闘開始 G20_BulletShooter.GetInstance().CanShoot = true; gameState = G20_GameState.INGAME; G20_EnemyCabinet.GetInstance().AllEnemyAIStart(); // 「SURVIVE!」表示 uiTextSurvive.SetActive(true); // BGM G20_BGMManager.GetInstance().Play(G20_BGMType.INGAME_0); G20_SEManager.GetInstance().Fadeout(seForest); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 5f)); uiTextSurvive.SetActive(false); yield return(null); }