Tap Trial: Player tap animation

This commit is contained in:
Braedon
2022-02-19 16:03:45 -05:00
parent 00ba7dd3b7
commit bef5518b8f
30 changed files with 9638 additions and 36 deletions

View File

@ -2,9 +2,57 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RhythmHeavenMania.Util;
namespace RhythmHeavenMania.Games.TapTrial
{
public class TapTrial : Minigame
{
[Header("References")]
public TapTrialPlayer player;
public static TapTrial instance { get; set; }
private void Awake()
{
instance = this;
}
public void Tap(float beat)
{
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("tapTrial/ook", beat),
new MultiSound.Sound("tapTrial/tap", beat + 1.0f),
});
GameObject beatAction = new GameObject();
beatAction.transform.SetParent(this.transform);
BeatAction.New(beatAction, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.0f, delegate { player.anim.Play("TapPrepare", 0, 0); }),
new BeatAction.Action(beat + 1.0f, delegate { player.anim.Play("Tap", 0, 0); }),
});
}
public void DoubleTap(float beat)
{
}
public void TripleTap(float beat)
{
}
public void JumpTap(float beat)
{
}
public void FinalJumpTap(float beat)
{
}
}
}

View File

@ -0,0 +1,15 @@
using UnityEngine;
namespace RhythmHeavenMania.Games.TapTrial
{
public class TapTrialPlayer : MonoBehaviour
{
[Header("References")]
[System.NonSerialized] public Animator anim;
private void Start()
{
anim = GetComponent<Animator>();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6892e03a2f2994b48a4b076fdfae805d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -209,7 +209,7 @@ namespace RhythmHeavenMania
new Param("colorA", RhythmTweezers.defaultOnionColor, "Onion Color"),
new Param("colorB", RhythmTweezers.defaultPotatoColor, "Potato Color")
} ),
new GameAction("change vegetable", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeVegetableImmediate(e.type, e.colorA, e.colorB); }, 0.5f, false, new List<Param>()
new GameAction("change vegetable", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeVegetableImmediate(e.type, e.colorA, e.colorB); }, 0.5f, false, new List<Param>()
{
new Param("type", new EntityTypes.Integer(0, 1), "Type"),
new Param("colorA", RhythmTweezers.defaultOnionColor, "Onion Color"),
@ -217,32 +217,37 @@ namespace RhythmHeavenMania
} ),
new GameAction("set tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = eventCaller.currentEntity.length; }, 1f, true),
new GameAction("reset tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = 0f; }, 0.5f),
new GameAction("set background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e.colorA, 0f); }, 0.5f, false, new List<Param>()
new GameAction("set background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e.colorA, 0f); }, 0.5f, false, new List<Param>()
{
new Param("colorA", RhythmTweezers.defaultBgColor, "Background Color")
} ),
new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); }, 1f, true, new List<Param>()
new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); }, 1f, true, new List<Param>()
{
new Param("colorA", Color.white, "Start Color"),
new Param("colorB", RhythmTweezers.defaultBgColor, "End Color")
} ),
}),
new Minigame("rhythmRally", "Rhythm Rally \n<color=#eb5454>[WIP don't use]</color>", "B888F8", true, false, new List<GameAction>()
new Minigame("rhythmRally", "Rhythm Rally \n<color=#eb5454>[WIP don't use]</color>", "00e700", true, false, new List<GameAction>()
{
new GameAction("bop", delegate { RhythmRally.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true),
new GameAction("rally", delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Normal); }, 4f, true),
new GameAction("slow rally", delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Slow); }, 8f, true),
new GameAction("fast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Fast); }, 6f),
new GameAction("superfast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.SuperFast); }, 12f),
new GameAction("pose", delegate { RhythmRally.instance.Pose(); }, 0.5f),
new GameAction("slow rally", delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Slow); }, 8f, true),
new GameAction("fast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Fast); }, 6f),
new GameAction("superfast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.SuperFast); }, 12f),
new GameAction("pose", delegate { RhythmRally.instance.Pose(); }, 0.5f),
}),
new Minigame("builtToScaleDS", "Built To Scale (DS) \n<color=#eb5454>[WIP don't use]</color>", "B888F8", true, false, new List<GameAction>()
{
new GameAction("spawn blocks", delegate { }, 1f, true)
}),
new Minigame("tapTrial", "Tap Trial", "B888F8", false, false, new List<GameAction>()
new Minigame("tapTrial", "Tap Trial", "93ffb3", false, false, new List<GameAction>()
{
new GameAction("tap", delegate { TapTrial.instance.Tap(eventCaller.currentEntity.beat); }, 1.5f, false),
new GameAction("double tap", delegate { TapTrial.instance.DoubleTap(eventCaller.currentEntity.beat); }, 2.0f, false),
new GameAction("triple tap", delegate { TapTrial.instance.TripleTap(eventCaller.currentEntity.beat); }, 4.0f, false),
new GameAction("jump tap", delegate { TapTrial.instance.JumpTap(eventCaller.currentEntity.beat); }, 2.0f, false),
new GameAction("final jump tap", delegate { TapTrial.instance.FinalJumpTap(eventCaller.currentEntity.beat); }, 2.0f, false),
}),
/*new Minigame("spaceDance", "Space Dance", "B888F8", new List<GameAction>()
{