More Tweaks

This commit is contained in:
RochesterX
2025-01-17 20:11:04 -05:00
parent 7a646ca1ea
commit 91c8c40ab5
4 changed files with 364 additions and 2 deletions

View File

@@ -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;
}
}

View File

@@ -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()