Merge branch 'master' into pr/140

This commit is contained in:
minenice55
2022-08-09 10:20:59 -04:00
614 changed files with 152236 additions and 8077 deletions

View File

@ -42,6 +42,9 @@ namespace HeavenStudio
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorA;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorB;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorC;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorD;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorE;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorF;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string text1;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string text2;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string text3;
@ -74,7 +77,7 @@ namespace HeavenStudio
}
catch (Exception ex)
{
UnityEngine.Debug.LogError($"You probably misspelled a paramater, or defined the object type wrong. Exception log: {ex}");
UnityEngine.Debug.LogError($"You probably misspelled a parameter, or defined the object type wrong. Exception log: {ex}");
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8003568095ad4a9479dc75768215a6d0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,591 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NaughtyBezierCurves;
using DG.Tweening;
using HeavenStudio.Util;
namespace HeavenStudio.Games.Loaders
{
using static Minigames;
public static class RvlBadmintonLoader
{
public static Minigame AddGame(EventCaller e)
{
return new Minigame("airRally", "Air Rally", "008c97", false, false, new List<GameAction>()
{
new GameAction("set distance", delegate { AirRally.instance.SetDistance(e.currentEntity.type); }, .5f, false, new List<Param>()
{
new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?")
}),
//new GameAction("start rally", delegate { AirRally.instance.StartRally(true); }, .5f, false),
new GameAction("rally", delegate { AirRally.instance.Rally(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.length); }, 2f, true, new List<Param>()
{
new Param("toggle", false, "Silent", "Make Forthington Silent"),
}),
new GameAction("ba bum bum bum", delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.type); }, 7f, false, new List<Param>()
{
new Param("toggle", false, "Count", "Make Forthington Count"),
new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?")
}),
new GameAction("forthington voice lines", delegate { AirRally.instance.ForthVoice(e.currentEntity.type, e.currentEntity.type2); }, 1f, false, new List<Param>()
{
new Param("type", AirRally.CountSound.one, "Type", "The number Forthington will say"),
new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?")
}),
});
}
}
}
namespace HeavenStudio.Games
{
using Scripts_AirRally;
public class AirRally : Minigame
{
public static AirRally instance { get; set; }
[Header("Component")]
[SerializeField] GameObject Baxter;
[SerializeField] GameObject Forthington;
[SerializeField] GameObject Shuttlecock;
public GameObject ActiveShuttle;
[SerializeField] GameObject objHolder;
public DistanceSound e_BaBumState;
[Header("Tween")]
Tween tweenForBaxter;
Tween tweenForForth;
[Header("Variables")]
public float serveBeat;
public bool started;
public bool served;
bool babum;
bool shuttleActive;
public bool hasMissed;
[Header("Waypoint")]
public float wayPointZForForth;
[Header("Curves")]
public BezierCurve3D closeRallyCurve;
public BezierCurve3D farRallyCurve;
public BezierCurve3D fartherRallyCurve;
public BezierCurve3D farthestRallyCurve;
public BezierCurve3D closeRallyReturnCurve;
[Header("Debug")]
public float beatShown;
public float lengthHolder;
public float lengthShown;
public int wantDistance;
public bool wantSilent;
public float beatHolder;
public Transform holderPos;
void Start()
{
Baxter.GetComponent<Animator>().Play("Idle");
Forthington.GetComponent<Animator>().Play("Idle");
}
private void Awake()
{
instance = this;
}
// Update is called once per frame
void Update()
{
if(PlayerInput.Pressed() && !IsExpectingInputNow())
{
Baxter.GetComponent<Animator>().Play("Hit");
Jukebox.PlayOneShotGame("airRally/whooshForth_Close", -1f);
}
var cond = Conductor.instance;
var currentBeat = cond.songPositionInBeats;
var hitBeat = serveBeat;
if (started)
{
if (!served)
{
hitBeat = serveBeat;
}
if(lengthHolder != lengthShown)
{
started = true;
//convert to 2 decimal places
var f = currentBeat;
//f = Mathf.Round(f * 10.0f) * 0.1f;
Rally(serveBeat + (int)f, wantSilent, lengthHolder);
//Debug.Log("Beat Loop: " + serveBeat + f);
//Debug.Log("Serve Beat: " + serveBeat);
}
}
}
public enum DistanceSound
{
close,
far,
farther,
farthest
}
public enum CountSound
{
one,
two,
three,
four
}
public void SpawnObject(float beat, int type)
{
BezierCurve3D curve = null;
switch (type)
{
case (int)DistanceSound.close:
curve = closeRallyCurve;
break;
case (int)DistanceSound.far:
curve = farRallyCurve;
break;
case (int)DistanceSound.farther:
curve = fartherRallyCurve;
break;
case (int)DistanceSound.farthest:
curve = farthestRallyCurve;
break;
}
//curve.KeyPoints[0].transform.position = new Vector3(holderPos.position.x, holderPos.position.y, wayPointZForForth);
if (!shuttleActive)
{
ActiveShuttle = GameObject.Instantiate(Shuttlecock, objHolder.transform);
ActiveShuttle.AddComponent<Shuttlecock>();
}
var shuttleScript = ActiveShuttle.GetComponent<Shuttlecock>();
shuttleScript.flyPos = 0f;
shuttleScript.isReturning = false;
shuttleScript.startBeat = (int)Conductor.instance.songPositionInBeats;
shuttleScript.curve = curve;
//float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(beat, 3f);
//ActiveShuttle.transform.position = curve.GetPoint(normalizedBeatAnim);
ActiveShuttle.transform.rotation = Quaternion.Euler(0, 0, 0);
ActiveShuttle.SetActive(true);
shuttleActive = true;
}
public void ReturnObject(float beat, int type)
{
BezierCurve3D curve = null;
switch (type)
{
case (int)DistanceSound.close:
curve = closeRallyCurve;
break;
case (int)DistanceSound.far:
curve = farRallyCurve;
break;
case (int)DistanceSound.farther:
curve = fartherRallyCurve;
break;
case (int)DistanceSound.farthest:
curve = farthestRallyCurve;
break;
}
ActiveShuttle.transform.localPosition = curve.KeyPoints[0].transform.position;
var shuttleScript = ActiveShuttle.GetComponent<Shuttlecock>();
shuttleScript.flyPos = 0f;
shuttleScript.isReturning = true;
shuttleScript.startBeat = beat;
//shuttleScript.curve = closeRallyReturnCurve;
//float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(beat, 3f);
//ActiveShuttle.transform.position = curve.GetPoint(normalizedBeatAnim);
ActiveShuttle.transform.rotation = Quaternion.Euler(0, 0, 0);
}
//change to something more optimized
public void ForthVoice(int type, int type2)
{
Forthington.GetComponent<Animator>().Play("TalkShort");
if (type == 0)
{
if(type2 == 0)
{
Jukebox.PlayOneShotGame("airRally/countIn1");
}
if(type2 == 1)
{
Jukebox.PlayOneShotGame("airRally/countIn1Far");
}
if(type2 == 2)
{
Jukebox.PlayOneShotGame("airRally/countIn1Farther");
}
if(type2 == 3)
{
Jukebox.PlayOneShotGame("airRally/countIn1Farthest");
}
}
if(type == 1)
{
if(type2 == 0)
{
Jukebox.PlayOneShotGame("airRally/countIn2");
}
if(type2 == 1)
{
Jukebox.PlayOneShotGame("airRally/countIn2Far");
}
if(type2 == 2)
{
Jukebox.PlayOneShotGame("airRally/countIn2Farther");
}
if(type2 == 3)
{
Jukebox.PlayOneShotGame("airRally/countIn2Farthest");
}
}
if(type == 2)
{
if(type2 == 0)
{
Jukebox.PlayOneShotGame("airRally/countIn3");
}
if(type2 == 1)
{
Jukebox.PlayOneShotGame("airRally/countIn3Far");
}
if(type2 == 2)
{
Jukebox.PlayOneShotGame("airRally/countIn3Farther");
}
if(type2 == 3)
{
Jukebox.PlayOneShotGame("airRally/countIn3Farthest");
}
}
if(type == 3)
{
if(type2 == 0)
{
Jukebox.PlayOneShotGame("airRally/countIn4");
}
if(type2 == 1)
{
Jukebox.PlayOneShotGame("airRally/countIn4Far");
}
if(type2 == 2)
{
Jukebox.PlayOneShotGame("airRally/countIn4Farther");
}
if(type2 == 3)
{
Jukebox.PlayOneShotGame("airRally/countIn4Farthest");
}
}
}
public void SetDistance(int type)
{
switch (type)
{
case 0:
e_BaBumState = DistanceSound.close;
break;
case 1:
e_BaBumState = DistanceSound.far;
break;
case 2:
e_BaBumState = DistanceSound.farther;
break;
case 3:
e_BaBumState = DistanceSound.farthest;
break;
}
}
public void StartRally(bool start)
{
started = start;
}
public void Rally(float beat, bool silent, float length)
{
started = true;
beatShown = beat;
if (started)
{
wantSilent = silent;
serveBeat += 2f;
lengthHolder = length;
lengthShown += 2f;
beatHolder = beat;
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
//new BeatAction.Action(beat, delegate { Forthington.GetComponent<Animator>().Play("Ready");} ),
new BeatAction.Action(beat, delegate { Forthington.GetComponent<Animator>().Play("Hit");} ),
//new BeatAction.Action(beat, delegate { SpawnObject(beat, (int)e_BaBumState); } ),
});
switch (e_BaBumState)
{
case DistanceSound.close:
wayPointZForForth = 3.55f;
tweenForForth = Forthington.gameObject.transform.DOMoveZ(wayPointZForForth, .15f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Baxter.GetComponent<Animator>().Play("CloseReady"); }),
new BeatAction.Action(beat, delegate { Jukebox.PlayOneShotGame("airRally/hitForth_Close"); }),
new BeatAction.Action(beat, delegate { if(!silent) { Jukebox.PlayOneShotGame("airRally/nya_Close"); } }),
new BeatAction.Action(beat + .25f, delegate { Jukebox.PlayOneShotGame("airRally/whooshForth_Close");}),
new BeatAction.Action(beat + 1f, delegate { if(!babum) { Forthington.GetComponent<Animator>().Play("Ready"); } }),
});
break;
case DistanceSound.far:
wayPointZForForth = 35.16f;
tweenForForth = Forthington.gameObject.transform.DOMoveZ(wayPointZForForth, .15f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Baxter.GetComponent<Animator>().Play("FarReady"); }),
new BeatAction.Action(beat, delegate { Jukebox.PlayOneShotGame("airRally/hitForth_Far"); }),
new BeatAction.Action(beat, delegate { if(!silent) { Jukebox.PlayOneShotGame("airRally/nya_Far"); } }),
new BeatAction.Action(beat + .25f, delegate { Jukebox.PlayOneShotGame("airRally/whooshForth_Far");}),
new BeatAction.Action(beat + 1f, delegate { if(!babum) { Forthington.GetComponent<Animator>().Play("Ready"); } }),
});
break;
case DistanceSound.farther:
wayPointZForForth = 105.16f;
tweenForForth = Forthington.gameObject.transform.DOMoveZ(wayPointZForForth, .15f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Baxter.GetComponent<Animator>().Play("FarReady"); }),
new BeatAction.Action(beat, delegate { Jukebox.PlayOneShotGame("airRally/hitForth_Farther"); }),
new BeatAction.Action(beat, delegate { if(!silent) { Jukebox.PlayOneShotGame("airRally/nya_Farther"); } }),
new BeatAction.Action(beat + .25f, delegate { Jukebox.PlayOneShotGame("airRally/whooshForth_Farther");}),
new BeatAction.Action(beat + 1f, delegate { if(!babum) { Forthington.GetComponent<Animator>().Play("Ready"); } }),
});
break;
case DistanceSound.farthest:
wayPointZForForth = 255.16f;
tweenForForth = Forthington.gameObject.transform.DOMoveZ(wayPointZForForth, .15f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Baxter.GetComponent<Animator>().Play("FarReady"); }),
new BeatAction.Action(beat, delegate { Jukebox.PlayOneShotGame("airRally/hitForth_Farthest"); }),
new BeatAction.Action(beat, delegate { if(!silent) { Jukebox.PlayOneShotGame("airRally/nya_Farthest"); } }),
new BeatAction.Action(beat + .25f, delegate { Jukebox.PlayOneShotGame("airRally/whooshForth_Farthest");}),
new BeatAction.Action(beat + 1f, delegate { if(!babum) { Forthington.GetComponent<Animator>().Play("Ready"); } }),
});
break;
}
//SpawnObject(beat, (int)e_BaBumState);
ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, RallyOnHit, RallyOnMiss, RallyEmpty);
//restart rally
if (lengthShown == lengthHolder || lengthShown >= lengthHolder)
{
serveBeat = 0f;
lengthShown = 0f;
lengthHolder = 0f;
}
}
}
public void BaBumBumBum(float beat, bool count, int type)
{
//This feels wrong, will keep until I figure out what's wrong
babum = true;
serveBeat = 0f;
lengthShown = 0f;
lengthHolder = 0f;
//if (!ActiveShuttle)
//{
// SpawnObject(beat, (int)e_BaBumState);
//}
string[] sounds = { "", "", "", "", "", ""};
string[] sounds2 = { "", "", "" };
if (e_BaBumState == DistanceSound.close || type == 0)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2.5f, delegate { Baxter.GetComponent<Animator>().Play("CloseReady");})
});
sounds[0] = "airRally/baBumBumBum_Close1";
sounds[1] = "airRally/baBumBumBum_Close2";
sounds[2] = "airRally/baBumBumBum_Close3";
sounds[3] = "airRally/baBumBumBum_Close4";
sounds[4] = "airRally/hitForth_Close";
sounds[5] = "airRally/whooshForth_Close";
sounds2 = new string[] { "airRally/countIn2", "airRally/countIn3", "airRally/countIn4" };
}
if (e_BaBumState == DistanceSound.far || type == 1)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2.5f, delegate { Baxter.GetComponent<Animator>().Play("FarReady");})
});
sounds[0] = "airRally/baBumBumBum_Far1";
sounds[1] = "airRally/baBumBumBum_Far2";
sounds[2] = "airRally/baBumBumBum_Far3";
sounds[3] = "airRally/baBumBumBum_Far4";
sounds[4] = "airRally/hitForth_Far";
sounds[5] = "airRally/whooshForth_Far";
sounds2 = new string[] { "airRally/countIn2Far", "airRally/countIn3Far", "airRally/countIn4Far" };
}
if (e_BaBumState == DistanceSound.farther || type == 2)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2.5f, delegate { Baxter.GetComponent<Animator>().Play("FarReady");})
});
sounds[0] = "airRally/baBumBumBum_Farther1";
sounds[1] = "airRally/baBumBumBum_Farther2";
sounds[2] = "airRally/baBumBumBum_Farther3";
sounds[3] = "airRally/baBumBumBum_Farther4";
sounds[4] = "airRally/hitForth_Farther";
sounds[5] = "airRally/whooshForth_Farther";
sounds2 = new string[] { "airRally/countIn2Farther", "airRally/countIn3Farther", "airRally/countIn4Farther" };
}
if (e_BaBumState == DistanceSound.farthest || type == 3)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2.5f, delegate { Baxter.GetComponent<Animator>().Play("FarthestReady");})
});
sounds[0] = "airRally/baBumBumBum_Farthest1";
sounds[1] = "airRally/baBumBumBum_Farthest2";
sounds[2] = "airRally/baBumBumBum_Farthest3";
sounds[3] = "airRally/baBumBumBum_Farthest4";
sounds[4] = "airRally/hitForth_Farthest";
sounds[5] = "airRally/whooshForth_Farthest";
sounds2 = new string[] { "airRally/countIn2Farthest", "airRally/countIn3Farthest", "airRally/countIn4Farthest" };
}
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate { Forthington.GetComponent<Animator>().Play("Ready"); }),
new BeatAction.Action(beat + 2.5f, delegate { if(babum) { Forthington.GetComponent<Animator>().Play("Hit"); } }),
new BeatAction.Action(beat + 3.5f, delegate { Forthington.GetComponent<Animator>().Play("TalkShort"); }),
new BeatAction.Action(beat + 4f, delegate { if(!count) Forthington.GetComponent<Animator>().Play("TalkShort"); }),
new BeatAction.Action(beat + 4.5f, delegate { Forthington.GetComponent<Animator>().Play("Ready"); }),
new BeatAction.Action(beat + 7f, delegate { if(babum) { babum = false; } }),
});
BeatAction.New(gameObject, new List<BeatAction.Action>() //MultiSound.Sound sounds weird
{
new BeatAction.Action(beat, delegate { Jukebox.PlayOneShotGame(sounds[0]); }),
new BeatAction.Action(beat + .5f, delegate { Jukebox.PlayOneShotGame(sounds[1]); }),
new BeatAction.Action(beat + 1.5f, delegate { Jukebox.PlayOneShotGame(sounds[2]); }),
new BeatAction.Action(beat + 2.5f, delegate { Jukebox.PlayOneShotGame(sounds[3]); }),
new BeatAction.Action(beat + 2.5f, delegate { Jukebox.PlayOneShotGame(sounds[4]); }),
new BeatAction.Action(beat + 3f, delegate { Jukebox.PlayOneShotGame(sounds[5]); }),
new BeatAction.Action(beat + 3.5f, delegate { if(e_BaBumState == DistanceSound.far) { Jukebox.PlayOneShotGame("airRally/whooshForth_Far2"); } }),
});
if (count)
{
var sound2 = new MultiSound.Sound[]
{
new MultiSound.Sound(sounds2[0], beat + 3.5f),
new MultiSound.Sound(sounds2[1], beat + 4.3f),
new MultiSound.Sound(sounds2[2], beat + 5.4f)
};
MultiSound.Play(sound2);
}
ScheduleInput(beat, 4.5f, InputType.STANDARD_DOWN, RallyOnHit, RallyOnMiss, RallyEmpty);
}
public void RallyOnHit(PlayerActionEvent caller, float beat)
{
Baxter.GetComponent<Animator>().Play("Hit");
hasMissed = false;
if (e_BaBumState == DistanceSound.close)
{
Jukebox.PlayOneShotGame("airRally/hitBaxter_Close");
}
if (e_BaBumState == DistanceSound.far)
{
Jukebox.PlayOneShotGame("airRally/hitBaxter_Far");
}
if (e_BaBumState == DistanceSound.farther)
{
Jukebox.PlayOneShotGame("airRally/hitBaxter_Farther");
}
if (e_BaBumState == DistanceSound.farthest)
{
Jukebox.PlayOneShotGame("airRally/hitBaxter_Farthest");
}
if (beatHolder % 2 == 0)
{
//ReturnObject(beatHolder + 1, 0);
//Debug.Log("a");
}
else
{
//ReturnObject(beatHolder + 1, 0);
//Debug.Log("b");
}
//Debug.Log("BeatHolder: " + beatHolder);
served = false;
}
public void RallyOnMiss(PlayerActionEvent caller)
{
served = false;
hasMissed = true;
shuttleActive = false;
}
public void RallyEmpty(PlayerActionEvent caller)
{
//empty
}
}
}

View File

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

View File

@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CircularMotion : MonoBehaviour
{
[SerializeField] float timeCounter = 0;
[SerializeField] Transform rootPos;
[SerializeField] float speed;
[SerializeField] float width;
[SerializeField] float height;
private void Start()
{
timeCounter = 0;
}
private void Update()
{
timeCounter += Time.deltaTime * speed;
float x = Mathf.Cos(timeCounter) * width + rootPos.position.x;
float y = Mathf.Sin(timeCounter) * height + rootPos.position.y;
float z = rootPos.position.z;
transform.position = new Vector3(x, y, z);
}
}

View File

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

View File

@ -0,0 +1,122 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NaughtyBezierCurves;
using HeavenStudio.Util;
namespace HeavenStudio.Games.Scripts_AirRally
{
public class Shuttlecock : PlayerActionObject
{
public float startBeat;
private float flyBeats;
public bool flyType;
bool miss = false;
public float flyPos;
public bool isReturning;
[NonReorderable] public BezierCurve3D curve;
AirRally game;
Vector3 nextPos;
private void Awake()
{
game = AirRally.instance;
flyBeats = 1f;
var cond = Conductor.instance;
flyPos = cond.GetPositionFromBeat(startBeat, flyBeats);
transform.position = curve.GetPoint(flyPos);
}
void Start()
{
}
// Update is called once per frame
void Update()
{
var cond = Conductor.instance;
//flyBeats = isReturning ? 1.2f : 1.2f;
float flyPos = cond.GetPositionFromBeat(startBeat, flyBeats);
if (flyPos <= 1f)
{
if (!miss)
{
flyPos *= .8f;
}
Vector3 lastPos = transform.position;
nextPos = curve.GetPoint(flyPos);
curve.KeyPoints[0].transform.position = new Vector3(game.holderPos.position.x, game.holderPos.position.y, game.wayPointZForForth);
if (isReturning)
{
curve.transform.localScale = new Vector3(-1, 1);
}
else
{
curve.transform.localScale = new Vector3(1, 1);
}
if (flyType)
{
Vector3 direction = (nextPos - lastPos).normalized;
float rotation = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg;
this.transform.eulerAngles = new Vector3(0, 0, rotation);
}
else
{
if (!isReturning)
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (360f * Time.deltaTime));
else
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (-360f * Time.deltaTime));
}
transform.position = nextPos;
}
//else
//{
// transform.position = curve.GetPoint(miss ? 1f : 0.95f);
//}
//if (flyPos > 1f)
//{
// if (Conductor.instance.GetPositionFromBeat(startBeat, flyBeats + 1f) >= 1f)
// {
// GameObject.Destroy(gameObject);
// return;
// }
//}
//if(flyPos > 1f)
//{
// if(Conductor.instance.GetPositionFromBeat(startBeat, flyBeats + 1f) >= 1f)
// {
// if (!isReturning)
// {
// curve = game.MissCurve;
// transform.position = curve.GetPoint(flyPos);
// }
// else
// {
// curve = game.MissReturnCurve;
// transform.position = curve.GetPoint(flyPos);
// }
// return;
// }
//}
if (game.hasMissed && flyPos > 1f)
{
if (Conductor.instance.GetPositionFromBeat(startBeat, flyBeats + 1f) >= 1f)
{
GameObject.Destroy(gameObject);
return;
}
}
}
}
}

View File

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

View File

@ -11,7 +11,7 @@ namespace HeavenStudio.Games.Loaders
public static class CtrBearLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("blueBear", "Blue Bear \n<color=#eb5454>[WIP don't use]</color>", "B4E6F6", false, false, new List<GameAction>()
return new Minigame("blueBear", "Blue Bear", "B4E6F6", false, false, new List<GameAction>()
{
new GameAction("donut", delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, false); }, 3, false),
new GameAction("cake", delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, true); }, 4, false),

View File

@ -12,32 +12,42 @@ namespace HeavenStudio.Games.Loaders
{
public static Minigame AddGame(EventCaller eventCaller)
{
return new Minigame("coinToss", "Coin Toss \n [One coin at a time!]", "B4E6F6", false, false, new List<GameAction>()
return new Minigame("coinToss", "Coin Toss", "B4E6F6", false, false, new List<GameAction>()
{
new GameAction("toss", delegate { CoinToss.instance.TossCoin(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); }, 7, false, parameters: new List<Param>()
{
new Param("toggle", false, "Audience Reaction", "Enable Audience Reaction"),
}),
new GameAction("set background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f); }, 0.5f, false, new List<Param>()
new GameAction("set background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f); CoinToss.instance.ChangeBackgroundColor(e.colorB, 0f, true); }, 0.5f, false, new List<Param>()
{
new Param("colorA", CoinToss.defaultBgColor, "Background Color", "The background color to change to")
new Param("colorA", CoinToss.defaultBgColor, "Background Color", "The background color to change to"),
new Param("colorB", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to")
} ),
new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); }, 1f, true, new List<Param>()
new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); CoinToss.instance.FadeBackgroundColor(e.colorC, e.colorD, e.length, true); }, 1f, true, new List<Param>()
{
new Param("colorA", Color.white, "Start Color", "The starting color in the fade"),
new Param("colorB", CoinToss.defaultBgColor, "End Color", "The ending color in the fade")
new Param("colorA", Color.white, "BG Start Color", "The starting color in the fade"),
new Param("colorB", CoinToss.defaultBgColor, "BG End Color", "The ending color in the fade"),
new Param("colorC", Color.white, "FG Start Color", "The starting color in the fade"),
new Param("colorD", CoinToss.defaultFgColor, "FG End Color", "The ending color in the fade")
} ),
new GameAction("set foreground color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f, true); }, 0.5f, false, new List<Param>()
//left in for backwards-compatibility, but cannot be placed
new GameAction("set foreground color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f, true); }, 0.5f, false, new List<Param>
{
new Param("colorA", CoinToss.defaultFgColor, "Background Color", "The background color to change to")
} ),
new Param("colorA", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to")
}, hidden: true ),
new GameAction("fade foreground color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length, true); }, 1f, true, new List<Param>()
{
new Param("colorA", Color.white, "Start Color", "The starting color in the fade"),
new Param("colorB", CoinToss.defaultFgColor, "End Color", "The ending color in the fade")
} ),
}, hidden: true ),
},
new List<string>() {"ntr", "aim"},
"ntrcoin", "en",

View File

@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Loaders
public static class AgbFireworkLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("fireworks", "Fireworks \n<color=#eb5454>[WIP don't use]</color>", "000000", false, false, new List<GameAction>()
return new Minigame("fireworks", "Fireworks \n<color=#eb5454>[WIP]</color>", "000000", false, false, new List<GameAction>()
{
});
}

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: fb2fdb673d6d1c34ab348b9c0da08705
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fb2fdb673d6d1c34ab348b9c0da08705
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,316 +1,3 @@
<<<<<<< HEAD
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.Util;
namespace HeavenStudio.Games.Loaders
{
using static Minigames;
public static class CtrFirstContact
{
public static Minigame AddGame(EventCaller eventCaller)
{
return new Minigame("firstContact", "First Contact", "008c97", false, false, new List<GameAction>()
{
new GameAction("beat intervals", delegate { FirstContact.instance.SetIntervalStart(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 4f, true),
new GameAction("alien speak", delegate { FirstContact.instance.alienSpeak(eventCaller.currentEntity.beat); }, 0.5f, false),
new GameAction("alien turnover", delegate { FirstContact.instance.alienTurnOver(eventCaller.currentEntity.beat); }, 0.5f, false),
new GameAction("alien success", delegate { FirstContact.instance.alienSuccess(eventCaller.currentEntity.beat); }, 1f, false),
new GameAction("mission control", delegate { FirstContact.instance.missionControlDisplay(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); }, 1f, false, new List<Param>
{
new Param("toggle", false, "Stay", "If it's the end of the remix/song")
}),
new GameAction("look at", delegate { FirstContact.instance.lookAtDirection(eventCaller.currentEntity.type, eventCaller.currentEntity.type2); }, .5f, false, new List<Param>()
{
new Param("type", FirstContact.alienLookAt.lookAtTranslator, "alien look at what", "[Alien] will look at what"),
new Param("type", FirstContact.translatorLookAt.lookAtAlien, "translator look at what", "[Translator] will look at what"),
}),
//new GameAction("Version of First Contact", delegate { FirstContact.instance.versionOfFirstContact(eventCaller.currentEntity.type); }, .5f, false, new List<Param>
//{
// new Param("type", FirstContact.VersionOfContact.FirstContact, "Version", "Version of First Contact to play"),
//}),
});
}
}
}
namespace HeavenStudio.Games
{
using Scripts_FirstContact;
public class FirstContact : Minigame
{
public static FirstContact instance { get; private set; }
[Header("Properties")]
public int alienSpeakCount;
public int translatorSpeakCount;
public bool hasMissed;
private float lastReportedBeat = 0f;
[Header("Components")]
[SerializeField] GameObject alien;
[SerializeField] Translator translator;
[SerializeField] GameObject alienSpeech;
[SerializeField] GameObject dummyHolder;
[SerializeField] GameObject missionControl;
[SerializeField] GameObject liveBar;
[Header("Variables")]
public bool intervalStarted;
//float intervalStartBeat;
public float beatInterval = 4f;
public bool isCorrect, noHitOnce, isSpeaking;
//public int version;
public float lookAtLength = 1f;
//public enum VersionOfContact
//{
// FirstContact,
// CitrusRemix,
// SecondContact
//}
public enum alienLookAt
{
lookAtTranslator,
idle
}
public enum translatorLookAt
{
lookAtAlien,
idle
}
private void Awake()
{
instance = this;
translator.Init();
}
private void Update()
{
//This is taken from the conductor script
if (Conductor.instance.ReportBeat(ref lastReportedBeat))
{
liveBar.GetComponent<Animator>().Play("liveBar", 0, 0);
}
else if(Conductor.instance.songPositionInBeats < lastReportedBeat)
{
lastReportedBeat = Mathf.Round(Conductor.instance.songPositionInBeats);
}
}
//public void versionOfFirstContact(int type)
//{
// version = type;
//}
public void lookAtDirection(int alienLookAt, int translatorLookAt)
{
switch (alienLookAt)
{
case 0:
alien.GetComponent<Animator>().Play("alien_lookAt", 0, 0);
break;
case 1:
alien.GetComponent<Animator>().Play("alien_idle", 0, 0);
break;
}
switch (translatorLookAt)
{
case 0:
translator.GetComponent<Animator>().Play("translator_lookAtAlien", 0, 0);
break;
case 1:
translator.GetComponent<Animator>().Play("translator_idle", 0, 0);
break;
}
}
public void alienSpeak(float beat)
{
//if (!intervalStarted)
//{
// SetIntervalStart(beat, beatInterval);
//}
//missionControl.SetActive(false);
Jukebox.PlayOneShotGame("firstContact/alien");
var random = Random.Range(0, 2);
string textToPut = "";
if(random == 0)
{
textToPut = "translator_lookAtAlien";
}
else
{
textToPut = "translator_lookAtAlien_nod";
}
BeatAction.New(alien, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { alien.GetComponent<Animator>().Play("alien_talk", 0, 0); }),
new BeatAction.Action(beat, delegate { translator.GetComponent<Animator>().Play(textToPut, 0, 0); }),
});
AlienFirstContact a = Instantiate(alienSpeech, dummyHolder.transform).GetComponent<AlienFirstContact>();
a.GetComponent<AlienFirstContact>().createBeat = beat;
alienSpeakCount++;
}
public void alienTurnOver(float beat)
{
//if (!intervalStarted)
//{
// SetIntervalStart(beat, beatInterval);
//}
Jukebox.PlayOneShotGame("firstContact/turnover");
BeatAction.New(alien, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { alien.GetComponent<Animator>().Play("alien_point", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { alien.GetComponent<Animator>().Play("alien_idle", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { translator.GetComponent<Animator>().Play("translator_idle", 0, 0); })
});
isSpeaking = true;
}
public void SetIntervalStart(float beat, float interval = 4f)
{
if (!intervalStarted)
{
alienSpeakCount = 0;
translatorSpeakCount = 0;
intervalStarted = true;
}
//intervalStartBeat = beat;
beatInterval = interval;
}
public void alienSuccess(float beat)
{
//Make this codeblock smaller
if (alienSpeakCount == translatorSpeakCount)
{
string[] sounds = new string[] { "firstContact/success_1", "firstContact/success_2" };
var sound = new MultiSound.Sound[]
{
new MultiSound.Sound(sounds[0], beat),
new MultiSound.Sound(sounds[1], beat + .5f, offset: .15f)
};
MultiSound.Play(sound);
BeatAction.New(alien, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { alien.GetComponent<Animator>().Play("alien_success", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { alien.GetComponent<Animator>().Play("alien_success", 0, 0); })
});
BeatAction.New(translator.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { translator.GetComponent<Animator>().Play("translator_idle", 0, 0); }),
});
}
else if (alienSpeakCount != translatorSpeakCount)
{
string[] sounds = new string[] { "firstContact/failAlien_1", "firstContact/failAlien_2" };
var sound = new MultiSound.Sound[]
{
new MultiSound.Sound(sounds[0], beat),
new MultiSound.Sound(sounds[1], beat + .5f)
};
MultiSound.Play(sound);
BeatAction.New(alien, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { alien.GetComponent<Animator>().Play("alien_fail", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { alien.GetComponent<Animator>().Play("alien_fail", 0, 0); })
});
BeatAction.New(translator.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { translator.GetComponent<Animator>().Play("translator_idle", 0, 0); }),
});
}
alienSpeakCount = 0;
translatorSpeakCount = 0;
isSpeaking = false;
hasMissed = false;
noHitOnce = false;
}
public void alienNoHit()
{
if (!noHitOnce)
{
Jukebox.PlayOneShotGame("firstContact/alienNoHit");
noHitOnce = true;
}
BeatAction.New(alien, new List<BeatAction.Action>()
{
new BeatAction.Action(.5f, delegate { alien.GetComponent<Animator>().Play("alien_noHit", 0, 0); }),
});
}
public void missionControlDisplay(float beat, bool stay)
{
missionControl.SetActive(true);
string textToPut = "";
if (alienSpeakCount == translatorSpeakCount)
{
textToPut = "missionControl_success";
}
else
{
textToPut = "missionControl_fail";
}
BeatAction.New(missionControl, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { missionControl.GetComponentInParent<Animator>().Play(textToPut, 0, 0); }),
new BeatAction.Action(beat, delegate { alien.GetComponentInParent<Animator>().Play("alien_idle", 0, 0); }),
new BeatAction.Action(beat, delegate { translator.GetComponent<Animator>().Play("translator_idle", 0, 0); }),
});
if (!stay)
{
BeatAction.New(missionControl, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1f, delegate { missionControl.SetActive(false); }),
});
}
else
{
missionControl.SetActive(true);
}
alienSpeakCount = 0;
translatorSpeakCount = 0;
isSpeaking = false;
}
}
}
=======
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.Util;
@ -411,7 +98,7 @@ namespace HeavenStudio.Games
instance = this;
}
public void SetIntervalStart(float beat, float interval = 4f)
public void SetIntervalStart(float beat, float interval)
{
if (!intervalStarted)
{
@ -436,7 +123,7 @@ namespace HeavenStudio.Games
lastReportedBeat = Mathf.Round(Conductor.instance.songPositionInBeats);
}
if (PlayerInput.Pressed() && !IsExpectingInputNow() && !noHitOnce && !isSpeaking)
if (PlayerInput.Pressed() && !IsExpectingInputNow() && !noHitOnce && !isSpeaking && !missionControl.activeInHierarchy)
{
Jukebox.PlayOneShotGame("firstContact/" + randomizerLines());
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
@ -525,15 +212,7 @@ namespace HeavenStudio.Games
public void alienTurnOver(float beat)
{
if (!intervalStarted)
{
SetIntervalStart(beat, beatInterval);
}
if (intervalStarted)
{
SetIntervalStart(beat, beatInterval);
}
SetIntervalStart(beat, beatInterval);
Jukebox.PlayOneShotGame("firstContact/turnover");
BeatAction.New(alien, new List<BeatAction.Action>()
@ -594,6 +273,7 @@ namespace HeavenStudio.Games
alienSpeakCount = 0;
translatorSpeakCount = 0;
intervalStarted = false;
isSpeaking = false;
hasMissed = false;
noHitOnce = false;
@ -625,7 +305,7 @@ namespace HeavenStudio.Games
{
BeatAction.New(missionControl, new List<BeatAction.Action>()
{
new BeatAction.Action(length, delegate { missionControl.SetActive(false); }),
new BeatAction.Action(beat + length, delegate { missionControl.SetActive(false); }),
});
}
else
@ -685,6 +365,4 @@ namespace HeavenStudio.Games
return Random.Range(1, 11);
}
}
}
>>>>>>> d65cae24d2db1df6a0e5bb4d3bd4e86fe633985f
}

View File

@ -47,7 +47,11 @@ namespace HeavenStudio.Games.Global
// startColor = new Color(1, 1, 1, 0);
// endColor = new Color(1, 1, 1, 0);
allFadeEvents = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "flash" });
allFadeEvents = EventCaller.GetAllInGameManagerList("vfx", new string[] { "flash" });
Test(beat);
// backwards-compatibility baybee
allFadeEvents.AddRange(EventCaller.GetAllInGameManagerList("gameManager", new string[] { "flash" }));
Test(beat);
}

View File

@ -32,7 +32,7 @@ namespace HeavenStudio.Games.Loaders
}),
new GameAction("kick", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 4); }, 4.5f),
new GameAction("combo", delegate { KarateMan.instance.Combo(eventCaller.currentEntity.beat); }, 4f),
new GameAction("hit3", delegate
new GameAction("hitX", delegate
{
var e = eventCaller.currentEntity;
switch ((KarateMan.HitThree)e.type)
@ -47,26 +47,22 @@ namespace HeavenStudio.Games.Loaders
new Param("type", KarateMan.HitThree.HitThree, "Type", "What should be called out")
}),
new GameAction("prepare", delegate { KarateMan.instance.Prepare(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 1f, true),
new GameAction("set background color", delegate {
new GameAction("set background effects", delegate {
var e = eventCaller.currentEntity;
var c = KarateMan.instance.BackgroundColors[e.type];
if(e.type == (int)KarateMan.BackgroundType.Custom) c = e.colorA;
KarateMan.instance.SetBackgroundColor(e.type, e.type2, c, e.colorB);
KarateMan.instance.SetBackgroundFX((KarateMan.BackgroundFXType)eventCaller.currentEntity.type3);
}, 0.5f, false, new List<Param>()
{
new Param("type", KarateMan.BackgroundType.Yellow, "Background Type", "The preset background type"),
new Param("type2", KarateMan.ShadowType.Tinted, "Shadow Type", "The shadow type. If Tinted doesn't work with your background color try Custom"),
new Param("colorA", new Color(), "Custom Background Color", "The background color to use when background type is set to Custom"),
new Param("colorB", new Color(), "Custom Shadow Color", "The shadow color to use when shadow type is set to Custom"),
new Param("type3", KarateMan.BackgroundFXType.None, "FX Type", "The background effect to be displayed")
}),
new GameAction("set background fx", delegate {
KarateMan.instance.SetBackgroundFX((KarateMan.BackgroundFXType)eventCaller.currentEntity.type);
}, 0.5f, false, new List<Param>()
{
new Param("type", KarateMan.BackgroundFXType.None, "FX Type", "The background effect to be displayed")
}),
// These are still here for backwards-compatibility but are hidden in the editor
new GameAction("pot", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 0); }, 2, hidden: true),
new GameAction("rock", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 2); }, 2, hidden: true),
@ -75,8 +71,18 @@ namespace HeavenStudio.Games.Loaders
new GameAction("hit4", delegate { KarateMan.instance.Hit4(eventCaller.currentEntity.beat); }, hidden: true),
new GameAction("bgfxon", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.Sunburst); }, hidden: true),
new GameAction("bgfxoff", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.None); }, hidden: true),
new GameAction("set background fx", delegate {
KarateMan.instance.SetBackgroundFX((KarateMan.BackgroundFXType)eventCaller.currentEntity.type);
}, 0.5f, false, new List<Param>()
{
new Param("type", KarateMan.BackgroundFXType.None, "FX Type", "The background effect to be displayed")
});
},
hidden: true
)
});;
}
}
}

View File

@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Loaders
public static class RvlRocketLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("launch party", "Launch Party \n<color=#eb5454>[WIP don't use]</color>", "000000", false, false, new List<GameAction>()
return new Minigame("launch party", "Launch Party \n<color=#eb5454>[WIP]</color>", "000000", false, false, new List<GameAction>()
{
});
}

View File

@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Loaders
public static class PcoSomenLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("rhythmSomen", "Rhythm Sōmen \n<color=#eb5454>[WIP don't use]</color>", "000000", false, false, new List<GameAction>()
return new Minigame("rhythmSomen", "Rhythm Sōmen", "000000", false, false, new List<GameAction>()
{
new GameAction("crane (far)", delegate { RhythmSomen.instance.DoFarCrane(eventCaller.currentEntity.beat); }, 4.0f, false),
new GameAction("crane (close)", delegate { RhythmSomen.instance.DoCloseCrane(eventCaller.currentEntity.beat); }, 3.0f, false),

View File

@ -12,7 +12,7 @@ namespace HeavenStudio.Games.Loaders
public static class NtrSamuraiLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("samuraiSliceNtr", "Samurai Slice (DS) \n<color=#eb5454>[WIP]</color>", "00165D", false, false, new List<GameAction>()
return new Minigame("samuraiSliceNtr", "Samurai Slice (DS)", "00165D", false, false, new List<GameAction>()
{
new GameAction("spawn object", delegate
{

View File

@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScrollForTap : MonoBehaviour
{
public float scrollSpeedX;
public float scrollSpeedY;
Vector3 startPos;
public float lengthX;
public float lengthY = 43.20976f;
private void Start()
{
startPos = transform.localPosition;
UpdatePos();
}
private void Update()
{
UpdatePos();
}
private void UpdatePos()
{
float newPosX = Mathf.Repeat(Time.time * scrollSpeedX, lengthX);
float newPosY = Mathf.Repeat(Time.time * scrollSpeedY, lengthY);
transform.localPosition = startPos + new Vector3(1 * newPosX, 1 * newPosY);
}
}

View File

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

View File

@ -1,6 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using HeavenStudio.Util;
@ -10,7 +12,7 @@ namespace HeavenStudio.Games.Loaders
public static class AgbTapLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("tapTrial", "Tap Trial \n<color=#eb5454>[WIP don't use]</color>", "93ffb3", false, false, new List<GameAction>()
return new Minigame("tapTrial", "Tap Trial \n<color=#eb5454>[WIP]</color>", "93ffb3", false, false, new List<GameAction>()
{
new GameAction("bop", delegate { TapTrial.instance.Bop(eventCaller.currentEntity.toggle); }, .5f, false, new List<Param>()
{
@ -19,8 +21,19 @@ namespace HeavenStudio.Games.Loaders
new GameAction("tap", delegate { TapTrial.instance.Tap(eventCaller.currentEntity.beat); }, 2.0f, 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 prep", delegate { TapTrial.instance.JumpTapPrep(eventCaller.currentEntity.beat); }, 1.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 GameAction("scroll event", delegate { TapTrial.instance.scrollEvent(eventCaller.currentEntity.toggle, eventCaller.currentEntity.toggle); }, .5f, false, new List<Param>()
{
new Param("toggle", false, "Scroll FX", "Will scroll"),
new Param("toggle", false, "Flash FX", "Will flash to white"),
}),
new GameAction("giraffe events", delegate { TapTrial.instance.giraffeEvent(eventCaller.currentEntity.toggle, eventCaller.currentEntity.toggle); }, .5f, false, new List<Param>()
{
new Param("toggle", false, "Enter", "Giraffe will enter the scene"),
new Param("toggle", false, "Exit", "Giraffe will exit the scene"),
})
});
}
}
@ -29,15 +42,33 @@ namespace HeavenStudio.Games.Loaders
namespace HeavenStudio.Games
{
using Scripts_TapTrial;
using HeavenStudio.Common;
public class TapTrial : Minigame
{
[Header("References")]
public TapTrialPlayer player;
public GameObject tap;
//public GameObject tap;
[SerializeField] List<Animator> monkeys;
bool goBop;
[SerializeField] List<GameObject> monkey_roots;
[SerializeField] GameObject player_root;
//temporary
[SerializeField] List<GameObject> monkey_effects;
[SerializeField] List<GameObject> player_effects;
[SerializeField] Scroll scrollBG;
[SerializeField] SpriteRenderer flash;
[SerializeField] ScrollForTap scroll;
[SerializeField] GameObject giraffe;
bool goBop, isPrep;
float lastReportedBeat = 0f;
bool hasJumped, isFinalJump;
public float jumpStartTime = Single.MinValue;
float jumpPos;
public float time;
bool once;
public bool crIsRunning;
[SerializeField] GameObject bg;
bool giraffeIsIn;
public static TapTrial instance { get; set; }
@ -48,19 +79,54 @@ namespace HeavenStudio.Games
private void Update()
{
if (goBop)
{
if (goBop && !isPrep)
{
if (Conductor.instance.ReportBeat(ref lastReportedBeat))
{
monkeys[0].Play("Bop", 0, 0);
monkeys[1].Play("Bop", 0, 0);
player.anim.Play("Bop", 0, 0);
}
else if (Conductor.instance.songPositionInBeats < lastReportedBeat)
{
lastReportedBeat = Mathf.Round(Conductor.instance.songPositionInBeats);
}
}
jumpPos = Conductor.instance.GetPositionFromBeat(jumpStartTime, 1f);
if (Conductor.instance.songPositionInBeats >= jumpStartTime && Conductor.instance.songPositionInBeats < jumpStartTime + 1f)
{
float yMul = jumpPos * 2f - 1f;
float yWeight = -(yMul * yMul) + 1f;
monkey_roots[0].transform.localPosition = new Vector3(0, 1.5f * yWeight);
monkey_roots[1].transform.localPosition = new Vector3(0, 1.5f * yWeight);
if (!isFinalJump)
{
player_root.transform.localPosition = new Vector3(0f, 2.5f * yWeight);
}
else
{
player_root.transform.localPosition = new Vector3(0f, 3.5f * yWeight);
}
}
else
{
monkey_roots[0].transform.localPosition = new Vector3(0, 0);
monkey_roots[1].transform.localPosition = new Vector3(0, 0);
player_root.transform.localPosition = new Vector3(0, 0);
if (hasJumped)
{
//Jukebox.PlayOneShotGame("fanClub/landing_impact", pitch: UnityEngine.Random.Range(0.95f, 1f), volume: 1f / 4);
}
hasJumped = false;
}
if (PlayerInput.Pressed() && !IsExpectingInputNow())
{
player.anim.Play("Tap", 0, 0);
Jukebox.PlayOneShotGame("tapTrial/tonk");
}
}
public void Bop(bool isBopping)
@ -77,6 +143,7 @@ namespace HeavenStudio.Games
public void Tap(float beat)
{
isPrep = true;
Jukebox.PlayOneShotGame("tapTrial/ook");
player.anim.Play("TapPrepare", 0, 0);
@ -85,37 +152,21 @@ namespace HeavenStudio.Games
{
new BeatAction.Action(beat, delegate { monkeys[0].Play("TapPrepare"); }),
new BeatAction.Action(beat, delegate { monkeys[1].Play("TapPrepare"); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[0].Play("Tap"); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[0].Play("Tap"); particleEffectMonkeys(); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[1].Play("Tap"); }),
});
//CreateTap(beat);
ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, OnTap, OnTapMiss, OnEmpty);
}
public void OnTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("Tap", 0, 0);
}
public void OnDoubleTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("DoubleTap", 0, 0);
}
public void OnTapMiss(PlayerActionEvent caller)
{
}
public void OnEmpty(PlayerActionEvent caller)
{
//empty
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { isPrep = false; })
});
}
public void DoubleTap(float beat)
{
isPrep = true;
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("tapTrial/ookook", beat),
@ -128,10 +179,10 @@ namespace HeavenStudio.Games
{
new BeatAction.Action(beat, delegate { monkeys[0].Play("DoubleTapPrepare", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { monkeys[0].Play("DoubleTapPrepare_2", 0, 0); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[0].Play("DoubleTap", 0, 0); }),
new BeatAction.Action(beat + 1.5f, delegate { monkeys[0].Play("DoubleTap", 0, 0); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[0].Play("DoubleTap", 0, 0); particleEffectMonkeys(); }),
new BeatAction.Action(beat + 1.5f, delegate { monkeys[0].Play("DoubleTap", 0, 0); particleEffectMonkeys(); }),
});
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { monkeys[1].Play("DoubleTapPrepare", 0, 0); }),
@ -140,19 +191,24 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat + 1.5f, delegate { monkeys[1].Play("DoubleTap", 0, 0); }),
});
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 4f, delegate { isPrep = false; })
});
ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, OnDoubleTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, OnDoubleTap, OnTapMiss, OnEmpty);
}
public void TripleTap(float beat)
{
isPrep = true;
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("tapTrial/ooki1", beat),
new MultiSound.Sound("tapTrial/ooki2", beat + 0.5f)
});
//player.anim.Play("PosePrepare", 0, 0);
player.tripleOffset = 0;
BeatAction.New(gameObject, new List<BeatAction.Action>()
@ -166,7 +222,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate { monkeys[0].Play("PostPrepare_1", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { monkeys[0].Play("PostPrepare_2", 0, 0); }),
new BeatAction.Action(beat + 2f, delegate { monkeys[0].Play("PostTap", 0, 0); }),
new BeatAction.Action(beat + 2.5f, delegate { monkeys[0].Play("PostTap", 0, 0);}),
new BeatAction.Action(beat + 2.5f, delegate { monkeys[0].Play("PostTap_2", 0, 0); }),
new BeatAction.Action(beat + 3f, delegate { monkeys[0].Play("PostTap", 0, 0);}),
});
@ -175,35 +231,232 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate { monkeys[1].Play("PostPrepare_1", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { monkeys[1].Play("PostPrepare_2", 0, 0); }),
new BeatAction.Action(beat + 2f, delegate { monkeys[1].Play("PostTap", 0, 0); }),
new BeatAction.Action(beat + 2.5f, delegate { monkeys[1].Play("PostTap", 0, 0);}),
new BeatAction.Action(beat + 2.5f, delegate { monkeys[1].Play("PostTap_2", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { monkeys[1].Play("PostTap", 0, 0);}),
});
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { particleEffectMonkeys(); }),
new BeatAction.Action(beat + 2.5f, delegate { particleEffectMonkeys(); }),
new BeatAction.Action(beat + 3f, delegate { particleEffectMonkeys(); }),
});
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, OnTripleTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 2.5f, InputType.STANDARD_DOWN, OnTripleTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 3f, InputType.STANDARD_DOWN, OnTripleTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, OnTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 2.5f, InputType.STANDARD_DOWN, OnDoubleTap, OnTapMiss, OnEmpty);
ScheduleInput(beat, 3f, InputType.STANDARD_DOWN, OnTap, OnTapMiss, OnEmpty);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 4f, delegate { isPrep = false; })
});
}
public void JumpTap(float beat)
{
isPrep = true;
hasJumped = true;
Jukebox.PlayOneShotGame("tapTrial/jumptap1");
player.anim.Play("JumpTap", 0, 0);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate {jumpStartTime = Conductor.instance.songPositionInBeats;}),
new BeatAction.Action(beat, delegate {monkeys[0].Play("JumpTap", 0, 0); }),
new BeatAction.Action(beat, delegate {monkeys[1].Play("JumpTap", 0, 0); }),
new BeatAction.Action(beat + 1f, delegate { particleEffectMonkeys(); }),
new BeatAction.Action(beat + 1f, delegate { particleEffectMonkeys_2(); }),
});
ScheduleInput(beat, .95f, InputType.STANDARD_DOWN, OnJumpTap, OnJumpTapMiss, OnEmpty); //why .95f? no idea, doesn't sound right w/ 1f
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { isPrep = false; })
});
}
public void JumpTapPrep(float beat)
{
isPrep = true;
monkeys[0].Play("JumpPrepare", 0, 0);
monkeys[1].Play("JumpPrepare", 0, 0);
player.anim.Play("JumpPrepare", 0, 0);
}
public void FinalJumpTap(float beat)
{
isPrep = true;
hasJumped = true;
isFinalJump = true;
Jukebox.PlayOneShotGame("tapTrial/jumptap2");
player.anim.Play("FinalJump");
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate {jumpStartTime = Conductor.instance.songPositionInBeats;}),
new BeatAction.Action(beat, delegate {monkeys[0].Play("Jump", 0, 0); }),
new BeatAction.Action(beat, delegate {monkeys[1].Play("Jump", 0, 0); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[0].Play("FinalJumpTap", 0, 0); particleEffectMonkeys(); particleEffectMonkeys_2(); }),
new BeatAction.Action(beat + 1f, delegate { monkeys[1].Play("FinalJumpTap", 0, 0); }),
});
ScheduleInput(beat, .95f, InputType.STANDARD_DOWN, OnJumpFinalTap, OnFinalJumpTapMiss, OnEmpty);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { isPrep = false; })
});
}
public void CreateTap(float beat, int type = 0)
public void giraffeEvent(bool enter, bool exit)
{
GameObject _tap = Instantiate(tap);
_tap.transform.parent = tap.transform.parent;
_tap.SetActive(true);
Tap t = _tap.GetComponent<Tap>();
t.startBeat = beat;
t.type = type;
if (enter && !giraffeIsIn)
{
giraffe.SetActive(true);
giraffe.GetComponent<Animator>().Play("Enter", 0, 0);
giraffeIsIn = true;
}
else if (exit && giraffeIsIn)
{
giraffe.GetComponent<Animator>().Play("Exit", 0, 0);
giraffeIsIn = false;
}
}
public void scrollEvent(bool isScrolling, bool flashToWhite)
{
if (isScrolling)
{
if (!crIsRunning) // if coroutine is not running, play the following once
{
if (flashToWhite)
{
Sequence sequence = DOTween.Sequence();
sequence.Append(flash.DOColor(new Color(flash.color.r, flash.color.g, flash.color.b, .8f), 2f));
//sequence.Kill();
}
StartCoroutine(timer());
}
}
else //should be the reverse of the code above
{
scrollBG.enabled = false;
scrollBG.scrollSpeedY = 0;
}
}
#region Player Action Scripts
public void OnTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("Tap", 0, 0);
player_effects[0].GetComponent<ParticleSystem>().Play();
}
public void OnDoubleTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("DoubleTap", 0, 0);
player_effects[1].GetComponent<ParticleSystem>().Play();
}
public void OnTapMiss(PlayerActionEvent caller)
{
Jukebox.PlayOneShotGame("tapTrial/tapMonkey", pitch: 1.5f, volume: .3f);
}
public void OnJumpTapMiss(PlayerActionEvent caller)
{
Jukebox.PlayOneShotGame("tapTrial/tapMonkey", pitch: 1.5f, volume: .3f);
player.anim.Play("JumpTap_Miss", 0, 0);
}
public void OnFinalJumpTapMiss(PlayerActionEvent caller)
{
Jukebox.PlayOneShotGame("tapTrial/tapMonkey", pitch: 1.5f, volume: .3f);
player.anim.Play("FinalJump_Miss", 0, 0);
}
public void OnEmpty(PlayerActionEvent caller)
{
//empty
}
public void OnTripleTap(PlayerActionEvent caller, float beat)
{
if (player.tripleOffset % 2 == 0)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { player.anim.Play("PoseTap_L", 0, 0); })
});
player.tripleOffset += 1;
}
else
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { player.anim.Play("PoseTap_R", 0, 0); })
});
player.tripleOffset += 1;
}
player_effects[0].GetComponent<ParticleSystem>().Play();
Jukebox.PlayOneShotGame("tapTrial/tap");
}
public void OnJumpTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("JumpTap_Success", 0, 0);
player_effects[0].GetComponent<ParticleSystem>().Play();
player_effects[1].GetComponent<ParticleSystem>().Play();
}
public void OnJumpFinalTap(PlayerActionEvent caller, float beat)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
player.anim.Play("FinalJump_Tap");
player_effects[0].GetComponent<ParticleSystem>().Play();
player_effects[1].GetComponent<ParticleSystem>().Play();
isFinalJump = false;
}
#endregion
#region Misc. Functions
public void particleEffectMonkeys()
{
monkey_effects[0].GetComponent<ParticleSystem>().Play();
monkey_effects[1].GetComponent<ParticleSystem>().Play();
}
public void particleEffectMonkeys_2()
{
monkey_effects[2].GetComponent<ParticleSystem>().Play();
monkey_effects[3].GetComponent<ParticleSystem>().Play();
}
IEnumerator timer()
{
crIsRunning = true;
while (scroll.scrollSpeedY < 20)
{
scroll.scrollSpeedY += 5f;
yield return new WaitForSecondsRealtime(.5f);
}
}
#endregion
//this is the orig way for input handling
//public void CreateTap(float beat, int type = 0)
//{
// GameObject _tap = Instantiate(tap);
// _tap.transform.parent = tap.transform.parent;
// _tap.SetActive(true);
// Tap t = _tap.GetComponent<Tap>();
// t.startBeat = beat;
// t.type = type;
//}
}
}

View File

@ -10,7 +10,7 @@ namespace HeavenStudio.Games.Loaders
{
public static Minigame AddGame(EventCaller eventCaller)
{
return new Minigame("tram&Pauline", "Tram&Pauline \n<color=#eb5454>[WIP don't use]</color>", "000000", false, false, new List<GameAction>()
return new Minigame("tram&Pauline", "Tram & Pauline \n<color=#eb5454>[WIP]</color>", "000000", false, false, new List<GameAction>()
{
new GameAction("curtains", delegate { TramAndPauline.instance.Curtains(eventCaller.currentEntity.beat); }, 0.5f),
new GameAction("SFX", delegate { var e = eventCaller.currentEntity; TramAndPauline.instance.SFX(e.beat, e.toggle); }, 2.5f, false, new List<Param>()

View File

@ -13,7 +13,7 @@ namespace HeavenStudio.Games.Loaders
public static class MobTrickLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("trickClass", "Trick on the Class\n<color=#eb5454>[WIP]</color>", "C0171D", false, false, new List<GameAction>()
return new Minigame("trickClass", "Trick on the Class", "C0171D", false, false, new List<GameAction>()
{
new GameAction("toss", delegate
{

View File

@ -59,6 +59,9 @@ namespace HeavenStudio.Editor
case 3:
c = theme.properties.Layer4Col.Hex2RGB();
break;
case 4:
c = theme.properties.Layer5Col.Hex2RGB();
break;
}
layer.GetComponent<Image>().color = c;

View File

@ -19,6 +19,7 @@ namespace HeavenStudio.Editor
public string Layer2Col;
public string Layer3Col;
public string Layer4Col;
public string Layer5Col;
public string EventSelectedCol;
public string EventNormalCol;

View File

@ -24,7 +24,7 @@ namespace HeavenStudio.Editor.Track
cam = Editor.instance.EditorCamera;
float layerScaleDist = cam.WorldToScreenPoint(Timeline.instance.LayerCorners[1]).y - Camera.main.WorldToScreenPoint(Timeline.instance.LayerCorners[0]).y;
float modScale = Timeline.GetScaleModifier();
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, layerScaleDist/4 * (1/modScale));
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, layerScaleDist/5 * (1/modScale));
}
catch (System.NullReferenceException)
{

View File

@ -21,7 +21,7 @@ namespace HeavenStudio.Editor.Track
private Vector2 lastMousePos;
public List<TimelineEventObj> eventObjs = new List<TimelineEventObj>();
private bool lastFrameDrag;
public int LayerCount = 4;
public int LayerCount = 5;
public bool metronomeEnabled;
public bool resizable;
private bool movingPlayback;
@ -662,12 +662,12 @@ namespace HeavenStudio.Editor.Track
public float SnapToLayer(float y)
{
float size = LayerHeight();
return Mathf.Clamp(Mathp.Round2Nearest(y, size), -size * 3f, 0f);
return Mathf.Clamp(Mathp.Round2Nearest(y, size), -size * 4f, 0f);
}
public float LayerHeight()
{
return LayersRect.rect.height / 4f;
return LayersRect.rect.height / 5f;
}
public void SetPlaybackSpeed(float speed)

View File

@ -470,6 +470,9 @@ namespace HeavenStudio.Editor.Track
case 3:
c = EditorTheme.theme.properties.Layer4Col.Hex2RGB();
break;
case 4:
c = EditorTheme.theme.properties.Layer5Col.Hex2RGB();
break;
}
// c = new Color(c.r, c.g, c.b, 0.85f);

View File

@ -2,16 +2,17 @@
{
"name": "Rhythm Heaven Mania Default Editor Theme",
"name": "Heaven Studio Default Editor Theme",
"properties": {
"TempoLayerCol": "6cbcc4",
"MusicLayerCol": "a663cc",
"Layer1Col": "ef476f",
"Layer2Col": "ffd166",
"Layer3Col": "06d6a0",
"Layer4Col": "118ab2",
"Layer2Col": "f5813d",
"Layer3Col": "ffd166",
"Layer4Col": "06d6a0",
"Layer5Col": "118ab2",
"EventSelectedCol": "61e5ff",
"EventNormalCol": "FFFFFF",

View File

@ -219,7 +219,17 @@ namespace HeavenStudio
new GameAction("switchGame", delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat); }, 0.5f, inactiveFunction: delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat); }),
new GameAction("end", delegate { Debug.Log("end"); GameManager.instance.Stop(0); Timeline.instance?.SetTimeButtonColors(true, false, false);}),
new GameAction("skill star", delegate { }, 1f, true),
new GameAction("flash", delegate
new GameAction("toggle inputs", delegate
{
GameManager.instance.ToggleInputs(eventCaller.currentEntity.toggle);
}, 0.5f, true, new List<Param>()
{
new Param("toggle", true, "Enable Inputs")
}),
// DEPRECATED! Now in VFX
new GameAction("flash", delegate
{
/*Color colA = eventCaller.currentEntity.colorA;
@ -230,23 +240,15 @@ namespace HeavenStudio
GameManager.instance.fade.SetFade(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, startCol, endCol, eventCaller.currentEntity.ease);*/
}, 1f, true, new List<Param>()
}, 1f, true, new List<Param>()
{
new Param("colorA", Color.white, "Start Color"),
new Param("colorB", Color.white, "End Color"),
new Param("valA", new EntityTypes.Float(0, 1, 1), "Start Opacity"),
new Param("valB", new EntityTypes.Float(0, 1, 0), "End Opacity"),
new Param("ease", EasingFunction.Ease.Linear, "Ease")
} ),
new GameAction("toggle inputs", delegate
{
GameManager.instance.ToggleInputs(eventCaller.currentEntity.toggle);
}, 0.5f, true, new List<Param>()
{
new Param("toggle", true, "Enable Inputs")
}),
}, hidden: true ),
// DEPRECATED! Now in VFX
new GameAction("move camera", delegate
{
}, 1f, true, new List<Param>()
@ -269,6 +271,7 @@ namespace HeavenStudio
},
hidden: true ),
}),
new Minigame("countIn", "Count-Ins", "", false, true, new List<GameAction>()
{
new GameAction("4 beat count-in", delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length / 4f, e.type); }, 4f, true, new List<Param>()
@ -306,8 +309,29 @@ namespace HeavenStudio
new GameAction("four (alt)", delegate { SoundEffects.Count(3, true); }, 1f, hidden: true),
new GameAction("go! (alt)", delegate { SoundEffects.Go(true); }, 1f, hidden: true),
}),
new Minigame("vfx", "Visual Effects", "", false, true, new List<GameAction>()
{
new GameAction("flash", delegate
{
/*Color colA = eventCaller.currentEntity.colorA;
Color colB = eventCaller.currentEntity.colorB;
Color startCol = new Color(colA.r, colA.g, colA.b, eventCaller.currentEntity.valA);
Color endCol = new Color(colB.r, colB.g, colB.b, eventCaller.currentEntity.valB);
GameManager.instance.fade.SetFade(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, startCol, endCol, eventCaller.currentEntity.ease);*/
}, 1f, true, new List<Param>()
{
new Param("colorA", Color.white, "Start Color"),
new Param("colorB", Color.white, "End Color"),
new Param("valA", new EntityTypes.Float(0, 1, 1), "Start Opacity"),
new Param("valB", new EntityTypes.Float(0, 1, 0), "End Opacity"),
new Param("ease", EasingFunction.Ease.Linear, "Ease")
}, hidden: false ),
new GameAction("move camera", delegate
{
//TODO: move cam