public override void Move() { // Shot TryShot(); // Move if (GameSystem._Instance._moveInputArea.IsTouching()) { MoveByTouch(); } else { MoveByKey(); } // Check Hit if (IsHit(GameSystem._Instance._Bullets) != null || IsHit(GameSystem._Instance._Enemys) != null) { _alive = false; GameSystem._Instance.SetGameOver(); PlayerCrash playerCrash = GameSystem._Instance.CreatePlayer <PlayerCrash>(); playerCrash.Init(PlayName.effect_crack, _X, _Y, _angle); } }
public override void Move() { TryShot(); // 따라잡기가 아닌 프레임에서만 입력 적용 if (!GameSystem._Instance._FrameByOver) { if (GameSystem._Instance._MoveInputArea.IsTouching()) { MoveByTouch(); } else { MoveByKey(); } } // 탄, 적기와 충돌 체크 if (IsHit(GameSystem._Instance._Bullets) != null || IsHit(GameSystem._Instance._Enemys) != null) { if (!GameSystem._Instance.IsPlayerInvincible()) { _alive = false; // 게임에 알림 GameSystem._Instance.OnPlayerDied(); // 충돌 표시용 플레이어기 생성 GameSystem._Instance.PlaySoundEffect("PlayerExplosion"); PlayerCrash playerCrash = GameSystem._Instance.CreatePlayer <PlayerCrash>(); playerCrash.Init("Common/Player_Crash", _X, _Y, _angle); } // else // { // Debug.Log("Player Crashed!"); // } } }