Updated level and replay
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user