コード例 #1
0
        public void Tick()
        {
            var player = playerSystem.GetPlayer();

            if (levelLoader.GetCurrentLevel().GetType() == typeof(BattleGroundLevel) && player != null)
            {
                HandleAimingOfShot();
                HandleShotStatusChangeDueToVelocity(player);
            }
        }
コード例 #2
0
        public void FixedTick()
        {
            if (BattleTurn == BattleTurn.Player)
            {
                var player = playerSystem.GetPlayer();

                if (player != null)
                {
                    CheckForOpponentHit(player);
                }
            }
        }
コード例 #3
0
 private void ResetCamrea(string sceneName)
 {
     if (sceneName == BattleGroundSceneName)
     {
         cameraController.Target = playerSystem.GetPlayer().transform;
         cameraController.Refresh();
     }
 }
コード例 #4
0
        public void Tick()
        {
            var player = playerSystem.GetPlayer();

            if (levelLoader.GetCurrentLevel().GetType() == typeof(BattleGroundLevel) && player != null)
            {
                HandleSuspenseOfEnemyHit(player);
            }
        }
コード例 #5
0
        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);
            }
        }