Made enemies die
This commit is contained in:
14
Assets/Scripts/EnemyController.cs
Normal file
14
Assets/Scripts/EnemyController.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InterfaceOff.WorldScene
|
||||
{
|
||||
public class EnemyController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private PlayerController Player;
|
||||
[SerializeField] private int DeathIndex = 500;
|
||||
[SerializeField] private GameObject Renderer;
|
||||
|
||||
private void Update() =>
|
||||
Renderer.SetActive(DeathIndex > Player.FrameIndex);
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/EnemyController.cs.meta
Normal file
3
Assets/Scripts/EnemyController.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6262d641981b43889d09dccc3cb72b74
|
||||
timeCreated: 1768821711
|
||||
@@ -8,14 +8,11 @@ namespace InterfaceOff.WorldScene
|
||||
private static PlayerController Instance;
|
||||
private PlayerFrameInfo[] Frames;
|
||||
|
||||
[Header("Bullet Tracer Info")]
|
||||
[SerializeField] private LineRenderer BulletTracerRenderer;
|
||||
[SerializeField] private Transform BulletTracerStart;
|
||||
[SerializeField] private Transform BulletTracerEnd;
|
||||
|
||||
[Header("Dev View")]
|
||||
[SerializeField] private int FrameIndex;
|
||||
|
||||
[field: SerializeField] public int FrameIndex { get; private set; }
|
||||
|
||||
private float LerpValue;
|
||||
|
||||
private void Awake()
|
||||
|
||||
Reference in New Issue
Block a user