Updated level and replay

This commit is contained in:
2026-01-19 11:16:25 +00:00
parent a9dfc40efb
commit 6c0db57956
11 changed files with 8154 additions and 5648 deletions

View File

@@ -20,12 +20,14 @@ namespace InterfaceOff.WorldScene
private void Awake()
{
/* Loads the JSON, temporary. TODO: Insert the JSON into this .cs file */
string json = File.ReadAllText(Application.dataPath + "/Resources/playerframe.json");
Frames = JsonUtility.FromJson<PlayerFrameInfoArray>(json).FrameInfo;
}
private void FixedUpdate()
{
/* Iterates the frame index */
FrameIndex = (FrameIndex + 1) % (Frames.Length - 2);
}
@@ -47,7 +49,7 @@ namespace InterfaceOff.WorldScene
BulletTracerRenderer.SetPosition(index: 0, BulletTracerStart.position);
BulletTracerRenderer.SetPosition(index: 1, BulletTracerEnd.position);
//BulletTracerRenderer.enabled = Frames[FrameIndex].ShootGun;
BulletTracerRenderer.enabled = Frames[FrameIndex].ShootGun;
}
}
}