More Tweaks
This commit is contained in:
@@ -21,6 +21,7 @@ public class Damageable : MonoBehaviour
|
||||
private void Recoil(GameObject damageSource)
|
||||
{
|
||||
GetComponent<Rigidbody2D>().AddForce(((transform.position - damageSource.transform.position).normalized + Vector3.up) * damage, ForceMode2D.Force);
|
||||
//damageSource.transform.localScale *= 1.1f;
|
||||
}
|
||||
|
||||
private void Damage()
|
||||
@@ -31,5 +32,6 @@ public class Damageable : MonoBehaviour
|
||||
public void ResetDamage()
|
||||
{
|
||||
damage = 0f;
|
||||
//transform.localScale = Vector3.one;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Tilemaps;
|
||||
@@ -13,6 +14,8 @@ public class PlayerMovement : MonoBehaviour
|
||||
[Header("Ground Layers")]
|
||||
public LayerMask ground;
|
||||
|
||||
public TextMeshProUGUI playerText;
|
||||
|
||||
[Header("Movement")]
|
||||
public float walkSpeed;
|
||||
public float walkSpeedFactor = 1f;
|
||||
@@ -58,6 +61,8 @@ public class PlayerMovement : MonoBehaviour
|
||||
input = GetComponent<PlayerInput>();
|
||||
animationPlayer = GetComponent<AnimationPlayer>();
|
||||
punch = GetComponent<Punch>();
|
||||
|
||||
playerText.text = input.playerIndex.ToString();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
Reference in New Issue
Block a user