movement, automated enemies, automated players, basic abilities
This commit is contained in:
parent
23576e137e
commit
f4344c4700
31 changed files with 4343 additions and 70 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Entity : MonoBehaviour
|
||||
|
|
@ -9,8 +10,17 @@ public class Entity : MonoBehaviour
|
|||
[Header("Stats")]
|
||||
public float speed;
|
||||
public float jumpPower;
|
||||
[Header("Abilities")]
|
||||
public List<Ability> abilities = new();
|
||||
public Transform attackOriginPoint;
|
||||
[SerializeField] protected Transform attackOriginCenter;
|
||||
[Header("Cache")]
|
||||
[SerializeField] protected Rigidbody2D rb;
|
||||
public List<Entity> entitiesInRange = new();
|
||||
public Entity closestEntity;
|
||||
[Header("Ground Detection")]
|
||||
[SerializeField] private Transform groundCheck;
|
||||
[SerializeField] private LayerMask groundLayer;
|
||||
|
||||
public void TakeDamage(float damage)
|
||||
{
|
||||
|
|
@ -31,4 +41,8 @@ public class Entity : MonoBehaviour
|
|||
{
|
||||
|
||||
}
|
||||
protected bool OnGround()
|
||||
{
|
||||
return Physics2D.OverlapCircle(groundCheck.position, 0.05f, groundLayer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue