diff options
author | chai <chaifix@163.com> | 2022-02-20 17:33:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-02-20 17:33:38 +0800 |
commit | 359e758911e3c29a789af60ba5ee208c8c7169d9 (patch) | |
tree | 3821468c22336b875140fca1a15931027edb583f /JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs | |
parent | 0e8ce5318fe683d0cf3d2c7c98fb361f62d4428f (diff) |
*rename folder name
Diffstat (limited to 'JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs')
-rw-r--r-- | JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs b/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs deleted file mode 100644 index 83454d1..0000000 --- a/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/Player.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- public class Player : MonoBehaviour
- {
- [SerializeField] private GameObject m_Bullet;
-
- private FPSCharacterController m_Controller;
-
- private void Awake()
- {
- m_Controller = GetComponent<FPSCharacterController>();
- }
-
- private void Start()
- {
- m_Controller.shootTarget = ShootTarget;
- m_Controller.checkHit = CheckHit;
- }
-
- bool CheckHit(RaycastHit hit)
- {
- return true;
- }
-
- void ShootTarget(Vector3 target, Transform muzzle)
- {
- GameObject go = GameObject.Instantiate(m_Bullet);
- go.transform.position = muzzle.position;
- go.GetComponent<Rigidbody>().velocity = (target - muzzle.position).normalized * 100;
- }
-
- }
-
-}
|