animation fixed

This commit is contained in:
Madhav Kapa 2023-06-15 15:26:12 +05:30
parent 3c8ab4d6ad
commit 1fc4c37e5a
6 changed files with 17 additions and 13 deletions

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 96a44475794fb6445a6f3c4b9ee13966 guid: a9c34549a246d47439b106bb23f71dff
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1619,11 +1619,11 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_steamAppID: 480 _steamAppID: 480
_serverBindAddress: _serverBindAddress: 76561198308605766
_port: 7770 _port: 7770
_maximumClients: 3188 _maximumClients: 3188
_peerToPeer: 0 _peerToPeer: 1
_clientAddress: _clientAddress: 76561198308605766
--- !u!1001 &1138118844 --- !u!1001 &1138118844
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -8,7 +8,7 @@ namespace Player
{ {
//private float mouseX = 0; //private float mouseX = 0;
//private float mouseY; //private float mouseY;
[SerializeField] private Camera cam; public Camera cam;
[SerializeField] private Transform target; [SerializeField] private Transform target;

View File

@ -1,9 +1,10 @@
using Cinemachine; using Cinemachine;
using FishNet.Object;
using UnityEngine; using UnityEngine;
namespace Player namespace Player
{ {
public class PlayerComponent : MonoBehaviour public class PlayerComponent : NetworkBehaviour
{ {
[SerializeField] private float health = 5f; [SerializeField] private float health = 5f;
@ -38,6 +39,15 @@ namespace Player
[HideInInspector] public bool IsAlive => health > 0; [HideInInspector] public bool IsAlive => health > 0;
public override void OnStartClient()
{
base.OnStartClient();
if (base.IsOwner)
{
cameraFreeLook = GameObject.Find("CM vcam1").GetComponent<CinemachineFreeLook>();
}
}
private void Awake() private void Awake()
{ {
flareRegister = FindObjectOfType<Item.FlareRegister>(); flareRegister = FindObjectOfType<Item.FlareRegister>();

View File

@ -72,6 +72,7 @@ namespace Player
camObject.GetComponent<CinemachineFreeLook>().Follow = transform; camObject.GetComponent<CinemachineFreeLook>().Follow = transform;
camObject.GetComponent<CinemachineFreeLook>().LookAt = transform.GetChild(0).GetChild(2); camObject.GetComponent<CinemachineFreeLook>().LookAt = transform.GetChild(0).GetChild(2);
transform.GetChild(0).GetComponent<PlayerAnimationController>().hiddenCam = cam; transform.GetChild(0).GetComponent<PlayerAnimationController>().hiddenCam = cam;
transform.GetChild(0).GetChild(2).GetComponent<CameraController>().cam = cam;
} }
else else
{ {

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 0957b521a08374f4aa508231735153bc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: