Initial Commit
This commit is contained in:
35
Assets/Scripts/AttackPoint.cs
Normal file
35
Assets/Scripts/AttackPoint.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AttackPoint : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int maxAttackers;
|
||||
private int curAttackers;
|
||||
private bool isFull;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
public bool CheckIfFull()
|
||||
{
|
||||
if(curAttackers >= maxAttackers)
|
||||
isFull = true;
|
||||
else
|
||||
isFull = false;
|
||||
return isFull;
|
||||
}
|
||||
public void AddAttacker()
|
||||
{
|
||||
curAttackers++;
|
||||
}
|
||||
public void RemoveAttacker()
|
||||
{
|
||||
curAttackers--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user