#34 name change
This commit is contained in:
parent
36e7ac6067
commit
65c9bd0de7
@ -95,7 +95,7 @@ namespace BlueWaterProject
|
||||
if (!Physics.Raycast(ray, out hit)) return false;
|
||||
if (!hit.collider.CompareTag("Ground")) return false;
|
||||
Destroy(gameObject);
|
||||
var obj = Instantiate(DataManager.Inst.boat, GameManager.Inst.player.transform.position,
|
||||
var obj = Instantiate(DataManager.Inst.boat, GameManager.Inst.shipPlayer.transform.position,
|
||||
Quaternion.identity);
|
||||
|
||||
var boat = obj.GetComponent<Boat>();
|
||||
|
@ -76,8 +76,8 @@ namespace BlueWaterProject
|
||||
Vector3 newPosition = takeAimCam.transform.position;
|
||||
newPosition.y += mouseDelta.y * sensitivity;
|
||||
newPosition.y = Mathf.Clamp(newPosition.y, heightLimits.x, heightLimits.y);
|
||||
newPosition.x = GameManager.Inst.player.transform.position.x;
|
||||
newPosition.z = GameManager.Inst.player.transform.position.z;
|
||||
newPosition.x = GameManager.Inst.shipPlayer.transform.position.x;
|
||||
newPosition.z = GameManager.Inst.shipPlayer.transform.position.z;
|
||||
takeAimCam.transform.position = newPosition;
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Npc2D : BaseCharacter2D
|
||||
public class Npc : BaseCharacter2D
|
||||
{
|
||||
|
||||
}
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class EmptyNpc : Npc2D
|
||||
public class EmptyNpc : Npc
|
||||
{
|
||||
|
||||
}
|
||||
|
13
BlueWater/Assets/02.Scripts/Character2D/Player2D/Player.cs
Normal file
13
BlueWater/Assets/02.Scripts/Character2D/Player2D/Player.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Player : BaseCharacter2D, IDamageable
|
||||
{
|
||||
public void TakeDamage(float attackerPower, float attackerShieldPenetrationRate = default, Vector3? attackPos = null)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Player2D : BaseCharacter2D
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class InShip2D : Player2D
|
||||
public class InShipPlayer : Player
|
||||
{
|
||||
|
||||
}
|
@ -11,7 +11,7 @@ namespace BlueWaterProject
|
||||
{
|
||||
[Title("Controller")]
|
||||
public CameraController CameraController { get; private set; }
|
||||
public Player player;
|
||||
public ShipPlayer shipPlayer;
|
||||
public List<Boat> boats = new List<Boat>(10);
|
||||
|
||||
[Range(0f, 1f)]
|
||||
@ -20,7 +20,7 @@ namespace BlueWaterProject
|
||||
private void Init()
|
||||
{
|
||||
CameraController = FindAnyObjectByType<CameraController>();
|
||||
player = FindAnyObjectByType<Player>();
|
||||
shipPlayer = FindAnyObjectByType<ShipPlayer>();
|
||||
}
|
||||
protected override void OnAwake()
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace BlueWaterProject
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.Inst.player.IsTargeting) return;
|
||||
if (!GameManager.Inst.shipPlayer.IsTargeting) return;
|
||||
if(!radarTargetUI.gameObject.activeInHierarchy && !isReloading)
|
||||
StartCoroutine(ReloadCoroutine());
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace BlueWaterProject
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
[RequireComponent(typeof(PlayerInput))]
|
||||
[SelectionBase]
|
||||
public class Player : MonoBehaviour
|
||||
public class ShipPlayer : Player
|
||||
{
|
||||
[Title("Component")]
|
||||
private Rigidbody rb;
|
||||
@ -86,22 +86,22 @@ namespace BlueWaterProject
|
||||
Raycast8DrawGizmo();
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
protected override void Awake()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
protected override void Start()
|
||||
{
|
||||
SwitchDredgeMode(true);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
protected override void FixedUpdate()
|
||||
{
|
||||
HandleMovement();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
protected override void Update()
|
||||
{
|
||||
FindInRadarRange();
|
||||
FilterInCameraObjects();
|
||||
@ -423,5 +423,7 @@ namespace BlueWaterProject
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -98,13 +98,13 @@ namespace BlueWaterProject
|
||||
{
|
||||
if (RadarTargetUis.Count == 0)
|
||||
{
|
||||
for (var i = 0; i < GameManager.Inst.player.Canons.Count; i++)
|
||||
for (var i = 0; i < GameManager.Inst.shipPlayer.Canons.Count; i++)
|
||||
{
|
||||
var obj = Instantiate(DataManager.Inst.radarTargetUi, radarTargets);
|
||||
var radarTargetUi = obj.GetComponent<RadarTargetUI>();
|
||||
radarTargetUi.RadarTargetInit(Random.Range(0f, 360f), Random.Range(0.1f, 0.2f));
|
||||
RadarTargetUis.Add(radarTargetUi);
|
||||
GameManager.Inst.player.Canons[i].radarTargetUI = radarTargetUi;
|
||||
GameManager.Inst.shipPlayer.Canons[i].radarTargetUI = radarTargetUi;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -123,7 +123,7 @@ namespace BlueWaterProject
|
||||
for (var i = 0; i < RadarTargetUis.Count; i++)
|
||||
{
|
||||
var radarTargetUI = RadarTargetUis[i];
|
||||
var canon = GameManager.Inst.player.Canons[i];
|
||||
var canon = GameManager.Inst.shipPlayer.Canons[i];
|
||||
var startAngle = radarTargetUI.RotationZ - radarTargetUI.Image.fillAmount * 180f;
|
||||
var endAngle = radarTargetUI.RotationZ + radarTargetUI.Image.fillAmount * 180f;
|
||||
|
||||
@ -144,7 +144,7 @@ namespace BlueWaterProject
|
||||
{
|
||||
enemyTarget = target;
|
||||
|
||||
if (enemyTarget != null && GameManager.Inst.player.IsTargeting)
|
||||
if (enemyTarget != null && GameManager.Inst.shipPlayer.IsTargeting)
|
||||
{
|
||||
Vector3 screenPos = GameManager.Inst.CameraController.MainCam.WorldToScreenPoint(enemyTarget.position);
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace BlueWaterProject
|
||||
rb = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
private void FixedUpdate()
|
||||
{
|
||||
var waveNumber = 2.0f * Mathf.PI / waveGenerator.waveLength;
|
||||
var phaseConstant = waveGenerator.speed * waveNumber;
|
||||
|
Loading…
Reference in New Issue
Block a user