mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 18:04:27 -05:00
Changed Player Stats and altered kick hit box
This commit is contained in:
@@ -59,13 +59,14 @@ public class KickController : NetworkBehaviour
|
||||
leg.SetActive(true);
|
||||
yield return new WaitForSeconds(waitTime);
|
||||
isKicking = false;
|
||||
leg.GetComponent<Collider>().isTrigger = false;
|
||||
leg.SetActive(false);
|
||||
|
||||
}
|
||||
|
||||
private void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
//if (!IsLocalPlayer) { return; }
|
||||
if (!IsLocalPlayer) { return; }
|
||||
Collider myCollider = collision.contacts[0].thisCollider;
|
||||
if (collision.transform.CompareTag("kickable") && myCollider == leg.GetComponent<Collider>()){
|
||||
if(collision.gameObject.GetComponent<Rigidbody>().isKinematic == true){
|
||||
@@ -74,6 +75,7 @@ public class KickController : NetworkBehaviour
|
||||
Vector3 direction = this.transform.forward;
|
||||
Debug.Log(direction);
|
||||
collision.rigidbody.AddForce(direction * pStats.KickPow, ForceMode.Impulse);
|
||||
leg.GetComponent<Collider>().isTrigger = true;
|
||||
}
|
||||
if (collision.transform.CompareTag("destroyable") && myCollider == leg.GetComponent<Collider>()){
|
||||
collision.transform.gameObject.GetComponent<BreakableBlock>().damage(pStats.KickPow);
|
||||
|
||||
Reference in New Issue
Block a user