Reconstruct lab story, interactions, patrol and jet pack practice flow
This commit is contained in:
1 parent
58424120bb
commit
c929f942e1
84 files changed
+7957
-305
No files matched your search
@@ -8,6 +8,7 @@ public sealed class PreviewAnimationLibrary
|
||||
{
|
||||
private readonly Dictionary<uint, (string Name, MorphAnimation Animation)> choices = [];
|
||||
private readonly Dictionary<PlayerPose, MorphAnimation> movement = [];
|
||||
private readonly Dictionary<string, MorphAnimation> actions = new(StringComparer.OrdinalIgnoreCase);
|
||||
public MorphAnimation Current { get; private set; }
|
||||
public string Name { get; private set; }
|
||||
public string WindowTitle => $"Jimmy Neutron — scene preview | {Name}{(Current.HasVertexMotion ? "" : " (still pose)")} | 1 idle, 2 run, 3 jump, 4 scratch | C camera";
|
||||
@@ -46,12 +47,18 @@ public sealed class PreviewAnimationLibrary
|
||||
if (ReferenceEquals(clip, Current)) Name = label;
|
||||
}
|
||||
foreach (var (pose, folder) in new[] { (PlayerPose.Idle, "jimstop"), (PlayerPose.Run, "jimrun"),
|
||||
(PlayerPose.Backpedal, "jimbackpedal"), (PlayerPose.Jump, "jimjump"), (PlayerPose.Fall, "jimfall") })
|
||||
(PlayerPose.Backpedal, "jimbackpedal"), (PlayerPose.Jump, "jimjump"), (PlayerPose.Fall, "jimfall"), (PlayerPose.Fly, "jimfly") })
|
||||
{
|
||||
var path = Path.Combine(parent, folder, "animation.json");
|
||||
if (!File.Exists(path)) continue;
|
||||
movement[pose] = Load(path);
|
||||
}
|
||||
foreach (var (action, folder) in new[] { ("STOP", "jimstop"), ("TALK", "jimtalk"), ("RUN", "jimrun"),
|
||||
("JUMP", "jimjump"), ("FALL", "jimfall"), ("SCRATCH", "jimscratch"), ("FLY", "jimfly") })
|
||||
{
|
||||
var path = Path.Combine(parent, folder, "animation.json");
|
||||
if (File.Exists(path)) actions[action] = Load(path);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Select(uint scancode)
|
||||
@@ -70,4 +77,10 @@ public sealed class PreviewAnimationLibrary
|
||||
Name = pose.ToString();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool SelectAction(string action)
|
||||
{
|
||||
if (!actions.TryGetValue(action, out var clip) || ReferenceEquals(Current, clip)) return false;
|
||||
Current = clip; Name = action; return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user