Added player death positions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InterfaceOff.WorldScene
|
||||
@@ -12,6 +13,7 @@ namespace InterfaceOff.WorldScene
|
||||
[SerializeField] private Transform BulletTracerStart;
|
||||
[SerializeField] private Transform BulletTracerEnd;
|
||||
[field: SerializeField] public int FrameIndex { get; private set; }
|
||||
[SerializeField] private int[] DeathIndices;
|
||||
|
||||
private float LerpValue;
|
||||
|
||||
@@ -26,6 +28,11 @@ namespace InterfaceOff.WorldScene
|
||||
{
|
||||
/* Iterates the frame index */
|
||||
FrameIndex = (FrameIndex + 1) % (Frames.Length - 2);
|
||||
|
||||
if (DeathIndices.Contains(FrameIndex))
|
||||
{
|
||||
Debug.Log("Possible player death");
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
Reference in New Issue
Block a user