public void Tick() { var player = playerSystem.GetPlayer(); if (levelLoader.GetCurrentLevel().GetType() == typeof(BattleGroundLevel) && player != null) { HandleAimingOfShot(); HandleShotStatusChangeDueToVelocity(player); } }
public void FixedTick() { if (BattleTurn == BattleTurn.Player) { var player = playerSystem.GetPlayer(); if (player != null) { CheckForOpponentHit(player); } } }
private void ResetCamrea(string sceneName) { if (sceneName == BattleGroundSceneName) { cameraController.Target = playerSystem.GetPlayer().transform; cameraController.Refresh(); } }
public void Tick() { var player = playerSystem.GetPlayer(); if (levelLoader.GetCurrentLevel().GetType() == typeof(BattleGroundLevel) && player != null) { HandleSuspenseOfEnemyHit(player); } }
private void HandleAimingOfShot() { if (MarbleShotStatus == MarbleShotStatus.PreparingShot) { ScrollLineRenderer(); var opponentPosition = lineRenderer.transform.position; var playerPosition = playerSystem.GetPlayer().transform.position; var localPlayerVector = playerPosition - opponentPosition; var localReflectionVector = Vector3.Scale(localPlayerVector, flipVectorMultiplier); var reflectionVector = localReflectionVector + opponentPosition; lineRenderer.SetPosition(0, opponentPosition); lineRenderer.SetPosition(1, reflectionVector); } }