Edit visual of playerControler
This commit is contained in:
parent
9d2c50bdd4
commit
0039160c60
@ -123,6 +123,11 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &80285248 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 3244356566819001084, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 9031117423312889080}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &447415686
|
--- !u!1 &447415686
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -253,7 +258,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 8768991388683709947, guid: 1e3f34788e0cb3f49a0bef285d5b059a, type: 3}
|
- {fileID: 8768991388683709947, guid: 1e3f34788e0cb3f49a0bef285d5b059a, type: 3}
|
||||||
- {fileID: 8768991388683709947, guid: 97d4c453fb5affa448968cb5ce9ca2f4, type: 3}
|
- {fileID: 8768991388683709947, guid: 97d4c453fb5affa448968cb5ce9ca2f4, type: 3}
|
||||||
- {fileID: 7678802340880963262, guid: c7b1510ab2ab8e349bfaafa501cecb1f, type: 3}
|
- {fileID: 7678802340880963262, guid: c7b1510ab2ab8e349bfaafa501cecb1f, type: 3}
|
||||||
player: {fileID: 9031117423312889081}
|
player: {fileID: 80285248}
|
||||||
--- !u!4 &1643205526
|
--- !u!4 &1643205526
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -334,8 +339,3 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
|
||||||
--- !u!1 &9031117423312889081 stripped
|
|
||||||
GameObject:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 3244356567786994344, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 9031117423312889080}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
|
@ -4,28 +4,32 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class PlayerController : MonoBehaviour
|
public class PlayerController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[Header("Move")]
|
||||||
public float speed = 7.5f;
|
public float speed = 7.5f;
|
||||||
public float maxSpeed = 15.0f;
|
public float maxSpeed = 15.0f;
|
||||||
public float minSpeed = 5.0f;
|
public float minSpeed = 5.0f;
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public float currentSpeed = 0f;
|
public float currentSpeed = 0f;
|
||||||
private float modifier = 0.0f;
|
private float modifier = 0.0f;
|
||||||
public float jumpSpeed = 7.5f;
|
|
||||||
public float lookSpeed = 7.5f;
|
|
||||||
public float lookXLimit = 40.0f;
|
|
||||||
public Camera playerCamera;
|
|
||||||
public ParticleSystem runningParticles;
|
|
||||||
Vector3 moveDirection = Vector3.zero;
|
Vector3 moveDirection = Vector3.zero;
|
||||||
public float rotationX = 0;
|
|
||||||
public Transform mainObject;
|
|
||||||
// Start is called before the first frame update
|
|
||||||
[HideInInspector]
|
|
||||||
bool canMove = true;
|
bool canMove = true;
|
||||||
Rigidbody rb;
|
Rigidbody rb;
|
||||||
float moveDirectionY;
|
float moveDirectionY;
|
||||||
|
public bool isRunning = false;
|
||||||
|
[Header("Jump")]
|
||||||
|
public float jumpSpeed = 7.5f;
|
||||||
|
[HideInInspector]
|
||||||
public bool jump = false;
|
public bool jump = false;
|
||||||
private bool isGrounded = false;
|
private bool isGrounded = false;
|
||||||
public bool isRunning = false;
|
[Header("Camera")]
|
||||||
|
public float lookSpeed = 7.5f;
|
||||||
|
public float lookXLimit = 40.0f;
|
||||||
|
public Camera playerCamera;
|
||||||
|
public float rotationX = 0;
|
||||||
|
[Header("Others")]
|
||||||
|
public ParticleSystem runningParticles;
|
||||||
|
public Transform mainObject;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
|
||||||
private Vector3 saveDirection;
|
private Vector3 saveDirection;
|
||||||
private Vector3 downDirection;
|
private Vector3 downDirection;
|
||||||
|
Loading…
Reference in New Issue
Block a user