Ejemplo n.º 1
0
        private void OnPlayerMove(PlayerMoveEvent playerMoveEvent)
        {
            float distancePlayerFromSafeCircle = Mathf.Sqrt(Mathf.Pow(deathCircle.transform.position.x - playerMoveEvent.PlayerMover.transform.position.x, 2) +
                                                            Mathf.Pow(deathCircle.transform.position.z - playerMoveEvent.PlayerMover.transform.position.z, 2));

            playerRadius    = distancePlayerFromSafeCircle;
            canPlayerGetHit = distancePlayerFromSafeCircle > deathCircle.Radius;
        }
Ejemplo n.º 2
0
        private void OnPlayerMove(PlayerMoveEvent playerMoveEvent)
        {
            playerPosition = playerMoveEvent.PlayerMover.transform.position;
            playerRadius   = Mathf.Sqrt(Mathf.Pow(center.x - playerPosition.x, 2) + Mathf.Pow(center.z - playerPosition.z, 2));
            playerDistance = playerRadius - safeCircleRadius;

            UpdateDistance();
        }
Ejemplo n.º 3
0
 private void OnPlayerMove(PlayerMoveEvent playerMoveEvent)
 {
     minimapCam.transform.position = new Vector3(playerMoveEvent.PlayerMover.transform.position.x, 100, playerMoveEvent.PlayerMover.transform.position.z);
 }
Ejemplo n.º 4
0
 private void OnPlayerMoved(PlayerMoveEvent newEvent)
 {
     CreateCellsForNearbyItem();
 }