Merge branch 'master' of https://github.com/adianfiuef/HeavenStudio
This commit is contained in:
commit
f8eaf1bb09
|
@ -1401,11 +1401,13 @@ AnimationClip:
|
|||
script: {fileID: 0}
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 5779691927641761196, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
value: {fileID: 8686924115327304628, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- time: 0.05
|
||||
value: {fileID: 3882487003558339588, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
value: {fileID: 8686924115327304628, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- time: 0.1
|
||||
value: {fileID: 1086597860007614453, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- time: 0.15
|
||||
value: {fileID: 3882487003558339588, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
value: {fileID: 1086597860007614453, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: Head
|
||||
classID: 212
|
||||
|
@ -1955,9 +1957,10 @@ AnimationClip:
|
|||
- {fileID: 5850673630285665839, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 2848929583589385298, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: -9219228821748572251, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 5779691927641761196, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 3882487003558339588, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 3882487003558339588, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 8686924115327304628, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 8686924115327304628, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 1086597860007614453, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 1086597860007614453, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: -7448459852879131668, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 6653196610736110185, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
- {fileID: 925825240639634137, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 1 MiB |
File diff suppressed because it is too large
Load diff
|
@ -7634,8 +7634,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 602.5, y: -3164.16}
|
||||
m_SizeDelta: {x: 1165, y: 64}
|
||||
m_AnchoredPosition: {x: 602.5, y: -3382.16}
|
||||
m_SizeDelta: {x: 1165, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &344042805
|
||||
CanvasRenderer:
|
||||
|
@ -19238,8 +19238,8 @@ MonoBehaviour:
|
|||
m_TargetGraphic: {fileID: 1589389272}
|
||||
m_HandleRect: {fileID: 1589389271}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 0.9972352
|
||||
m_Value: 0
|
||||
m_Size: 1
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
@ -24820,7 +24820,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 129.91093}
|
||||
m_AnchoredPosition: {x: 0, y: 129.9111}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &1154875944
|
||||
|
@ -28006,7 +28006,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000026703}
|
||||
m_SizeDelta: {x: 64, y: 64}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1294339011
|
||||
MonoBehaviour:
|
||||
|
@ -35580,9 +35580,9 @@ MonoBehaviour:
|
|||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1423699437}
|
||||
m_TargetAssemblyTypeName: RhythmHeavenMania.Editor.Editor, Assembly-CSharp
|
||||
m_MethodName: LoadRemix
|
||||
m_Mode: 5
|
||||
m_TargetAssemblyTypeName: HeavenStudio.Editor.Editor, Assembly-CSharp
|
||||
m_MethodName: NewRemix
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
|
@ -40746,7 +40746,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000026703}
|
||||
m_SizeDelta: {x: 64, y: 64}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1973314442
|
||||
MonoBehaviour:
|
||||
|
@ -40768,7 +40768,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 3882487003558339588, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
m_Sprite: {fileID: 6703875778577109625, guid: 62713d17eb1e1404bbafeb45c8b4b5b8, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace HeavenStudio
|
|||
private List<Beatmap.Entity> positionEvents = new List<Beatmap.Entity>();
|
||||
private List<Beatmap.Entity> rotationEvents = new List<Beatmap.Entity>();
|
||||
private List<Beatmap.Entity> scaleEvents = new List<Beatmap.Entity>();
|
||||
private List<Beatmap.Entity> shakeEvents = new List<Beatmap.Entity>();
|
||||
|
||||
/**
|
||||
default cam position, for quick-resetting
|
||||
|
@ -22,6 +23,7 @@ namespace HeavenStudio
|
|||
public static Vector3 defaultPosition = new Vector3(0, 0, -10);
|
||||
public static Vector3 defaultRotEluer = new Vector3(0, 0, 0);
|
||||
public static Vector3 defaultScale = new Vector3(16, 9, 1);
|
||||
public static Vector3 defaultShake = new Vector3(0, 0, 0);
|
||||
|
||||
/**
|
||||
camera's current transformation
|
||||
|
@ -30,6 +32,7 @@ namespace HeavenStudio
|
|||
private static Vector3 position;
|
||||
private static Vector3 rotEluer;
|
||||
private static Vector3 scale;
|
||||
private static Vector3 shakeResult;
|
||||
|
||||
/**
|
||||
camera's last transformation
|
||||
|
@ -38,6 +41,7 @@ namespace HeavenStudio
|
|||
private static Vector3 positionLast;
|
||||
private static Vector3 rotEluerLast;
|
||||
private static Vector3 scaleLast;
|
||||
private static Vector3 shakeLast;
|
||||
|
||||
/**
|
||||
transformations to apply *after* the global transform,
|
||||
|
@ -89,20 +93,27 @@ namespace HeavenStudio
|
|||
rotationEvents = EventCaller.GetAllInGameManagerList("vfx", new string[] { "rotate camera" });
|
||||
positionEvents.AddRange(EventCaller.GetAllInGameManagerList("gameManager", new string[] { "rotate camera" }));
|
||||
|
||||
//screen shake time baybee
|
||||
|
||||
shakeEvents = EventCaller.GetAllInGameManagerList("vfx", new string[] { "screen shake" });
|
||||
|
||||
|
||||
//scale (TODO)
|
||||
// scaleEvents = EventCaller.GetAllInGameManagerList("vfx", new string[] { "scale camera" });
|
||||
|
||||
UpdateCameraTranslate();
|
||||
UpdateCameraRotate();
|
||||
SetShakeIntensity();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UpdateCameraTranslate();
|
||||
UpdateCameraRotate();
|
||||
SetShakeIntensity();
|
||||
|
||||
Camera cam = GetCamera();
|
||||
cam.transform.localPosition = position + additionalPosition;
|
||||
cam.transform.localPosition = position + additionalPosition + shakeResult;
|
||||
cam.transform.eulerAngles = rotEluer + additionalRotEluer;
|
||||
cam.transform.localScale = Vector3.Scale(scale, additionalScale);
|
||||
}
|
||||
|
@ -137,8 +148,9 @@ namespace HeavenStudio
|
|||
EasingFunction.Function func = EasingFunction.GetEasingFunction(e.ease);
|
||||
float dx = func(rotEluerLast.x, e.valA, Mathf.Min(prog, 1f));
|
||||
float dy = func(rotEluerLast.y, e.valB, Mathf.Min(prog, 1f));
|
||||
float dz = func(rotEluerLast.z, e.valC, Mathf.Min(prog, 1f));
|
||||
rotEluer = new Vector3(dx, dy, dz);
|
||||
float dz = func(-rotEluerLast.z, e.valC, Mathf.Min(prog, 1f));
|
||||
rotEluer = new Vector3(dx, dy, dz); //I'm stupid and forgot to negate the rotation gfd 😢
|
||||
|
||||
}
|
||||
if (prog > 1f)
|
||||
{
|
||||
|
@ -147,11 +159,29 @@ namespace HeavenStudio
|
|||
}
|
||||
}
|
||||
|
||||
private void SetShakeIntensity()
|
||||
{
|
||||
foreach (var e in shakeEvents)
|
||||
{
|
||||
float prog = Conductor.instance.GetPositionFromBeat(e.beat, e.length);
|
||||
if (prog >= 0f)
|
||||
{
|
||||
float fac = Mathf.Cos(Time.time * 80f) * 0.5f;
|
||||
shakeResult = new Vector3(fac * e.valA, fac * e.valB);
|
||||
}
|
||||
if (prog > 1f)
|
||||
{
|
||||
shakeResult = new Vector3(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ResetTransforms()
|
||||
{
|
||||
position = defaultPosition;
|
||||
rotEluer = defaultRotEluer;
|
||||
scale = defaultScale;
|
||||
shakeResult = defaultShake;
|
||||
}
|
||||
|
||||
public static void ResetAdditionalTransforms()
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
public static Minigame AddGame(EventCaller eventCaller) {
|
||||
return new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 3, true),
|
||||
new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 1, true),
|
||||
new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); } ),
|
||||
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity.toggle ? 3 : 0); }, parameters: new List<Param>()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
}),
|
||||
new GameAction("change lion count", delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); }, 0.5f, false, new List<Param>()
|
||||
{
|
||||
new Param("valA", new EntityTypes.Integer(1, 8, 3), "Lion Count", "The amount of lions")
|
||||
new Param("valA", new EntityTypes.Integer(3, 8, 3), "Lion Count", "The amount of lions")
|
||||
}),
|
||||
// This is still here for backwards-compatibility but is hidden in the editor
|
||||
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); }, hidden: true),
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace HeavenStudio.Games
|
|||
public static FanClub instance;
|
||||
|
||||
const int FAN_COUNT = 12;
|
||||
const float RADIUS = 1.3f;
|
||||
const float RADIUS = 1.5f;
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
|
@ -732,7 +732,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (Spectators[i].GetComponent<NtrIdolFan>().IsJumping())
|
||||
continue;
|
||||
Spectators[i].GetComponent<Animator>().Play("FanPrepare");
|
||||
Spectators[i].GetComponent<Animator>().Play("FanPrepare", -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -741,7 +741,7 @@ namespace HeavenStudio.Games
|
|||
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
|
||||
new BeatAction.Action(beat + 0.25f, delegate { PlayAnimationAll("FanFree", true);}),
|
||||
new BeatAction.Action(beat + 0.1f, delegate { PlayAnimationAll("FanFree", true, true);}),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ namespace HeavenStudio.Games
|
|||
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
|
||||
new BeatAction.Action(beat + 1f, delegate { PlayAnimationAll("FanFree", true);}),
|
||||
new BeatAction.Action(beat + 1f, delegate { PlayAnimationAll("FanFree", true, true);}),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
public void ClapJust(PlayerActionEvent caller, float state)
|
||||
{
|
||||
bool auto = GameManager.instance.autoplay;
|
||||
ClapStart(true, false, auto ? 0.25f : 0f);
|
||||
ClapStart(true, false, auto ? 0.1f : 0f);
|
||||
}
|
||||
|
||||
public void ChargeClapJust(PlayerActionEvent caller, float state)
|
||||
|
|
|
@ -81,9 +81,9 @@ namespace HeavenStudio.Games.Loaders
|
|||
),
|
||||
new GameAction("set object colors", delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e.colorA, e.colorB, e.colorC); }, 0.5f, false, new List<Param>()
|
||||
{
|
||||
new Param("colorA", new Color(), "Joe Body Color", "The color to use for Karate Joe's body"),
|
||||
new Param("colorB", new Color(), "Joe Highlight Color", "The color to use for Karate Joe's highlights"),
|
||||
new Param("colorC", new Color(), "Item Color", "The color to use for the thrown items"),
|
||||
new Param("colorA", new Color(1,1,1,1), "Joe Body Color", "The color to use for Karate Joe's body"),
|
||||
new Param("colorB", new Color(0.81f,0.81f,0.81f,1), "Joe Highlight Color", "The color to use for Karate Joe's highlights"),
|
||||
new Param("colorC", new Color(1,1,1,1), "Item Color", "The color to use for the thrown items"),
|
||||
},
|
||||
inactiveFunction: delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e.colorA, e.colorB, e.colorC); }
|
||||
),
|
||||
|
@ -705,14 +705,15 @@ namespace HeavenStudio.Games
|
|||
if (e.beat > beat)
|
||||
break;
|
||||
SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3);
|
||||
SetBgTexture(e.type4, e.type5, e.colorC, e.colorD);
|
||||
}
|
||||
var bgtex = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/set background texture");
|
||||
for (int i = 0; i < bgtex.Count; i++)
|
||||
var camfx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/special camera");
|
||||
for (int i = 0; i < camfx.Count; i++)
|
||||
{
|
||||
var e = bgtex[i];
|
||||
var e = camfx[i];
|
||||
if (e.beat > beat)
|
||||
break;
|
||||
SetBgTexture(e.type, e.type2, e.colorA, e.colorB);
|
||||
DoSpecialCamera(e.beat, e.length, e.toggle);
|
||||
}
|
||||
// has issues when creating a new hitx entity so this is deactivated for now
|
||||
// var hitx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/hitX");
|
||||
|
@ -756,7 +757,10 @@ namespace HeavenStudio.Games
|
|||
|
||||
//😢
|
||||
if (fx != (int) BackgroundFXType.Fade)
|
||||
{
|
||||
bgColourLast = bgColour;
|
||||
oldShadowColour = GetShadowColor(true);
|
||||
}
|
||||
|
||||
if (textureFilterType == (int) ShadowType.Tinted)
|
||||
filterColour = Color.LerpUnclamped(bgColour, ShadowBlendColor, 0.45f);
|
||||
|
|
|
@ -117,6 +117,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public void DoHit()
|
||||
{
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
if (MaxNori <= 0) return;
|
||||
float oldNori = Nori;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
|
@ -135,7 +136,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
NoriHeartAnimators[i].Play("NoriFull", -1, (Time.time * PeriodHigh) % 1f);
|
||||
}
|
||||
}
|
||||
if (KarateMan.instance.NoriPerformance >= 0.6 && oldNori / MaxNori < 0.6)
|
||||
if (KarateMan.instance.NoriPerformance >= 0.6f && oldNori / MaxNori < 0.6f)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/nori_just");
|
||||
}
|
||||
|
@ -145,6 +146,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public void DoNG()
|
||||
{
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
if (MaxNori <= 0) return;
|
||||
float oldNori = Nori;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
|
@ -172,7 +174,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
}
|
||||
if (KarateMan.instance.NoriPerformance < 0.6 && oldNori / MaxNori >= 0.6)
|
||||
if (KarateMan.instance.NoriPerformance < 0.6f && oldNori / MaxNori >= 0.6f)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/nori_ng");
|
||||
}
|
||||
|
@ -182,6 +184,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public void DoThrough()
|
||||
{
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
if (MaxNori <= 0) return;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
if (Nori >= MaxNori)
|
||||
|
@ -219,6 +222,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
var cond = Conductor.instance;
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
if (MaxNori <= 0) return;
|
||||
float flashPeriod;
|
||||
for (int i = 0; i < NoriHeartMaterials.Length; i++)
|
||||
{
|
||||
|
|
|
@ -287,8 +287,17 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
transform.position = CurrentCurve.GetPoint(Mathf.Min(prog, 1f));
|
||||
}
|
||||
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + 2f)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], transform.position, Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (prog >= 2f || (ItemKickable() && prog >= 1f)) {
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
else if (prog >= 2f || (ItemKickable() && prog >= 1f)) {
|
||||
if (type == ItemType.KickBomb)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[6].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
|
@ -347,7 +356,18 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
break;
|
||||
case FlyStatus.NG:
|
||||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || (ItemKickable() && prog >= 1f) || CurrentCurve == null) {
|
||||
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + curveTargetBeat)
|
||||
{
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + curveTargetBeat, 1f);
|
||||
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || (ItemKickable() && prog >= 1f) || CurrentCurve == null) {
|
||||
if (type == ItemType.KickBomb)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[8].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
|
@ -371,13 +391,25 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
break;
|
||||
case FlyStatus.HitWeak:
|
||||
prog = cond.GetPositionFromBeat(startBeat, 1f);
|
||||
if (cond.songPositionInBeats >= startBeat + 3f)
|
||||
|
||||
Vector3 pos = new Vector3(HitPosition[1].position.x + 0.25f, HitPosition[0].position.y, HitPosition[1].position.z);
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + 1f)
|
||||
{
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + 1f, 1f);
|
||||
|
||||
ParticleSystem p = Instantiate(HitParticles[7], pos, Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= startBeat + 3f)
|
||||
{
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
Vector3 pos = new Vector3(HitPosition[1].position.x + 0.25f, HitPosition[0].position.y, HitPosition[1].position.z);
|
||||
if (prog <= 1f)
|
||||
{
|
||||
pos.y = EasingFunction.EaseInCubic(HitPosition[1].position.y, HitPosition[0].position.y, prog);
|
||||
|
@ -439,6 +471,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
Jukebox.PlayOneShotGame("karateman/rockHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[4], HitPosition[1].position, Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Ball:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
|
@ -455,6 +490,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
p.Play();
|
||||
game.CreateItemInstance(startBeat + 1f, "Item09", 0, ItemType.CookingLid);
|
||||
GetComponent<Animator>().Play("Item08", -1, 0);
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Alien:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
|
@ -462,6 +500,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
Jukebox.PlayOneShotGame("karateman/alienHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
|
@ -470,6 +511,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
p = Instantiate(HitParticles[2], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
game.Joe.RemoveBombGlow(startBeat + 1f, 1f);
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.TacoBell:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
|
@ -478,6 +522,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
Jukebox.PlayOneShotGame("karateman/tacobell", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.ComboPot1:
|
||||
CurrentCurve = ItemCurves[straight ? 1 : 0];
|
||||
|
@ -551,9 +598,16 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
default:
|
||||
CurrentCurve = ItemCurves[straight ? 1 : 0];
|
||||
curveTargetBeat = straight ? 1f : 1.5f;
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", forcePlay: true);
|
||||
if (game.IsNoriActive && game.NoriPerformance < 0.6f)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/potHit_lowNori", forcePlay: true);
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", volume: 0.66f, forcePlay: true);
|
||||
}
|
||||
else
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[3], HitPosition[1].position, Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -590,6 +644,21 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
|
||||
bool ItemNeedNori()
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ItemType.Rock:
|
||||
case ItemType.Cooking:
|
||||
case ItemType.Alien:
|
||||
case ItemType.Bomb:
|
||||
case ItemType.TacoBell:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void JoeComboSequence()
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
|
@ -683,8 +752,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
else {
|
||||
if (KarateMan.instance.IsNoriActive)
|
||||
{
|
||||
if ((type == ItemType.Rock || type == ItemType.Cooking || type == ItemType.Alien || type == ItemType.TacoBell)
|
||||
&& KarateMan.instance.NoriPerformance < 0.6f)
|
||||
if (ItemNeedNori() && KarateMan.instance.NoriPerformance < 0.6f)
|
||||
{
|
||||
CreateHitMark(false);
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
|||
{
|
||||
[Header("Objects")]
|
||||
public ParticleSystem moneyBurst;
|
||||
public ParticleSystem pickelBurst;
|
||||
public Animator anim;
|
||||
public NtrSamuraiObject secondHalf;
|
||||
|
||||
|
@ -44,6 +45,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
|||
case (int) SamuraiSliceNtr.ObjectType.Demon:
|
||||
anim.Play("ObjDemonDebris02");
|
||||
break;
|
||||
case (int) SamuraiSliceNtr.ObjectType.Melon2B2T:
|
||||
anim.Play("ObjMelonPickelDebris02");
|
||||
break;
|
||||
default:
|
||||
anim.Play("ObjMelonDebris");
|
||||
break;
|
||||
|
@ -70,6 +74,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
|||
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 2f),
|
||||
});
|
||||
break;
|
||||
case (int) SamuraiSliceNtr.ObjectType.Melon2B2T:
|
||||
anim.Play("ObjMelonPickel");
|
||||
break;
|
||||
default:
|
||||
anim.Play("ObjMelon");
|
||||
break;
|
||||
|
@ -280,8 +287,12 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
|||
|
||||
this.startBeat = caller.startBeat + caller.timer;
|
||||
if (type == (int) SamuraiSliceNtr.ObjectType.Demon)
|
||||
{
|
||||
anim.Play("ObjDemonDebris01");
|
||||
else if (type == (int) SamuraiSliceNtr.ObjectType.Melon2B2T)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("samuraiSliceNtr/melon_dig");
|
||||
pickelBurst.Play();
|
||||
anim.Play("ObjMelonPickelDebris01");
|
||||
}
|
||||
|
||||
if (holdingCash > 0)
|
||||
|
|
|
@ -41,7 +41,8 @@ namespace HeavenStudio.Games
|
|||
public enum ObjectType {
|
||||
Melon,
|
||||
Fish,
|
||||
Demon
|
||||
Demon,
|
||||
Melon2B2T,
|
||||
}
|
||||
|
||||
[Header("References")]
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
public class Kicker : PlayerActionObject
|
||||
{
|
||||
[Header("Properties")]
|
||||
public bool canKick;
|
||||
public bool canKick = true; //why was this false by default???
|
||||
public bool canHighKick;
|
||||
private bool kickPrepare = false;
|
||||
public bool kickLeft;
|
||||
|
@ -168,21 +168,22 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
kickLeft = true;
|
||||
}
|
||||
|
||||
List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
||||
// List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
||||
// for (int i = 0; i < keepUps.Count; i++)
|
||||
// {
|
||||
// if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||
// {
|
||||
// canKick = true;
|
||||
// canHighKick = false;
|
||||
// break;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// canKick = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
List<Beatmap.Entity> highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||
for (int i = 0; i < keepUps.Count; i++)
|
||||
{
|
||||
if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||
{
|
||||
canKick = true;
|
||||
canHighKick = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
canKick = false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < highKicks.Count; i++)
|
||||
{
|
||||
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||
|
@ -200,6 +201,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
}
|
||||
else
|
||||
{
|
||||
canKick = true;
|
||||
canHighKick = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,11 +18,11 @@ namespace HeavenStudio.Games.Loaders
|
|||
new Param("toggle", false, "Disable Sound", "Disables the dispense sound")
|
||||
},
|
||||
inactiveFunction: delegate { if (!eventCaller.currentEntity.toggle) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } }),
|
||||
new GameAction("keep-up", delegate { }, 4f, true),
|
||||
new GameAction("high kick-toe!", delegate { }, 3f, false, new List<Param>()
|
||||
{
|
||||
new Param("swing", new EntityTypes.Float(0, 1, 0.5f), "Swing", "The amount of swing")
|
||||
}),
|
||||
new GameAction("keep-up", delegate { }, 4f, true, hidden: true),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
DispenseSound(beat);
|
||||
}
|
||||
|
||||
kicker.canKick = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,15 @@ namespace HeavenStudio.Games.Loaders
|
|||
public static Minigame AddGame(EventCaller eventCaller) {
|
||||
return new Minigame("spaceball", "Spaceball", "00A518", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, false, eventCaller.currentEntity.type); }, 2, false),
|
||||
new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, true, eventCaller.currentEntity.type); }, 3),
|
||||
new GameAction("costume", delegate { Spaceball.instance.Costume(eventCaller.currentEntity.type); }, 1f, false, new List<Param>()
|
||||
new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, false, eventCaller.currentEntity.type); }, 2, false, new List<Param>()
|
||||
{
|
||||
new Param("type", Spaceball.BallType.Baseball, "Type", "The type of ball/object to shoot")
|
||||
} ),
|
||||
new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, true, eventCaller.currentEntity.type); }, 3, false, new List<Param>()
|
||||
{
|
||||
new Param("type", Spaceball.BallType.Baseball, "Type", "The type of ball/object to shoot")
|
||||
} ),
|
||||
new GameAction("costume", delegate { Spaceball.instance.Costume(eventCaller.currentEntity.type); }, 1f, false, new List<Param>()
|
||||
{
|
||||
new Param("type", Spaceball.CostumeType.Standard, "Type", "The costume to change to")
|
||||
} ),
|
||||
|
@ -36,6 +42,11 @@ namespace HeavenStudio.Games
|
|||
|
||||
public class Spaceball : Minigame
|
||||
{
|
||||
public enum BallType {
|
||||
Baseball,
|
||||
Onigiri
|
||||
}
|
||||
|
||||
public enum CostumeType {
|
||||
Standard,
|
||||
Bunny,
|
||||
|
|
|
@ -70,6 +70,8 @@ namespace HeavenStudio.Editor
|
|||
public bool editingInputField = false;
|
||||
public bool isCursorEnabled = true;
|
||||
|
||||
private byte[] MusicBytes;
|
||||
|
||||
public static Editor instance { get; private set; }
|
||||
|
||||
private void Start()
|
||||
|
@ -158,7 +160,7 @@ namespace HeavenStudio.Editor
|
|||
{
|
||||
if (Input.GetKeyDown(KeyCode.N))
|
||||
{
|
||||
LoadRemix("");
|
||||
NewRemix();
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.O))
|
||||
{
|
||||
|
@ -294,6 +296,22 @@ namespace HeavenStudio.Editor
|
|||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (clip != null)
|
||||
MusicBytes = OggVorbis.VorbisPlugin.GetOggVorbis(Conductor.instance.musicSource.clip, 1);
|
||||
else
|
||||
{
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
|
||||
return clip;
|
||||
}
|
||||
|
||||
|
@ -343,15 +361,12 @@ namespace HeavenStudio.Editor
|
|||
using (var zipStream = levelFile.Open())
|
||||
zipStream.Write(Encoding.UTF8.GetBytes(GetJson()), 0, Encoding.UTF8.GetBytes(GetJson()).Length);
|
||||
|
||||
if (changedMusic || currentRemixPath != path)
|
||||
if (MusicBytes != null)
|
||||
{
|
||||
// this gets rid of the music file for some reason, someone remind me to find a fix for this soon
|
||||
var musicFile = archive.CreateEntry("song.ogg", System.IO.Compression.CompressionLevel.NoCompression);
|
||||
using (var zipStream = musicFile.Open())
|
||||
zipStream.Write(MusicBytes, 0, MusicBytes.Length);
|
||||
}
|
||||
|
||||
byte[] bytes = OggVorbis.VorbisPlugin.GetOggVorbis(Conductor.instance.musicSource.clip, 1);
|
||||
var musicFile = archive.CreateEntry("song.ogg", System.IO.Compression.CompressionLevel.NoCompression);
|
||||
using (var zipStream = musicFile.Open())
|
||||
zipStream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
currentRemixPath = path;
|
||||
|
@ -359,6 +374,12 @@ namespace HeavenStudio.Editor
|
|||
}
|
||||
}
|
||||
|
||||
public void NewRemix()
|
||||
{
|
||||
MusicBytes = null;
|
||||
LoadRemix("");
|
||||
}
|
||||
|
||||
public void LoadRemix(string json = "")
|
||||
{
|
||||
GameManager.instance.LoadRemix(json);
|
||||
|
@ -367,6 +388,8 @@ namespace HeavenStudio.Editor
|
|||
Timeline.instance.VolumeInfo.UpdateStartingVolumeText();
|
||||
Timeline.instance.TempoInfo.UpdateOffsetText();
|
||||
Timeline.FitToSong();
|
||||
|
||||
currentRemixPath = string.Empty;
|
||||
}
|
||||
|
||||
public void OpenRemix()
|
||||
|
@ -380,58 +403,45 @@ namespace HeavenStudio.Editor
|
|||
{
|
||||
var path = Path.Combine(paths);
|
||||
|
||||
if (path != String.Empty)
|
||||
{
|
||||
loadedMusic = false;
|
||||
if (path == string.Empty) return;
|
||||
loadedMusic = false;
|
||||
|
||||
using (FileStream zipFile = File.Open(path, FileMode.Open))
|
||||
using var zipFile = File.Open(path, FileMode.Open);
|
||||
using var archive = new ZipArchive(zipFile, ZipArchiveMode.Read);
|
||||
|
||||
foreach (var entry in archive.Entries)
|
||||
switch (entry.Name)
|
||||
{
|
||||
using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Read))
|
||||
case "remix.json":
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
if (entry.Name == "remix.json")
|
||||
{
|
||||
using (var stream = entry.Open())
|
||||
{
|
||||
byte[] bytes;
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(ms);
|
||||
bytes = ms.ToArray();
|
||||
string json = Encoding.UTF8.GetString(bytes);
|
||||
LoadRemix(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entry.Name == "song.ogg")
|
||||
{
|
||||
using (var stream = entry.Open())
|
||||
{
|
||||
byte[] bytes;
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(ms);
|
||||
bytes = ms.ToArray();
|
||||
Conductor.instance.musicSource.clip = OggVorbis.VorbisPlugin.ToAudioClip(bytes, "music");
|
||||
loadedMusic = true;
|
||||
Timeline.FitToSong();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using var stream = entry.Open();
|
||||
using var reader = new StreamReader(stream);
|
||||
LoadRemix(reader.ReadToEnd());
|
||||
|
||||
break;
|
||||
}
|
||||
case "song.ogg":
|
||||
{
|
||||
using var stream = entry.Open();
|
||||
using var memoryStream = new MemoryStream();
|
||||
stream.CopyTo(memoryStream);
|
||||
MusicBytes = memoryStream.ToArray();
|
||||
Conductor.instance.musicSource.clip = OggVorbis.VorbisPlugin.ToAudioClip(MusicBytes, "music");
|
||||
loadedMusic = true;
|
||||
Timeline.FitToSong();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!loadedMusic)
|
||||
Conductor.instance.musicSource.clip = null;
|
||||
if (!loadedMusic)
|
||||
Conductor.instance.musicSource.clip = null;
|
||||
|
||||
currentRemixPath = path;
|
||||
remixName = Path.GetFileName(path);
|
||||
UpdateEditorStatus(false);
|
||||
CommandManager.instance.Clear();
|
||||
Timeline.FitToSong();
|
||||
}
|
||||
currentRemixPath = path;
|
||||
remixName = Path.GetFileName(path);
|
||||
UpdateEditorStatus(false);
|
||||
CommandManager.instance.Clear();
|
||||
Timeline.FitToSong();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -473,7 +483,7 @@ namespace HeavenStudio.Editor
|
|||
private void UpdateEditorStatus(bool updateTime)
|
||||
{
|
||||
if (discordDuringTesting || !Application.isEditor)
|
||||
DiscordRPC.DiscordRPC.UpdateActivity("In Editor", $"{remixName}", updateTime);
|
||||
DiscordRPC.DiscordRPC.UpdateActivity("In Editor", $"{remixName}", updateTime);
|
||||
}
|
||||
|
||||
public string GetJson()
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
@ -47,135 +47,139 @@ namespace HeavenStudio.Editor
|
|||
this.propertyName = propertyName;
|
||||
this.caption.text = caption;
|
||||
|
||||
var objType = type.GetType();
|
||||
|
||||
if (objType == typeof(EntityTypes.Integer))
|
||||
switch (type)
|
||||
{
|
||||
var integer = ((EntityTypes.Integer)type);
|
||||
case EntityTypes.Integer integer:
|
||||
slider.minValue = integer.min;
|
||||
slider.maxValue = integer.max;
|
||||
|
||||
slider.minValue = integer.min;
|
||||
slider.maxValue = integer.max;
|
||||
|
||||
slider.value = Mathf.RoundToInt(System.Convert.ToSingle(parameterManager.entity[propertyName]));
|
||||
inputField.text = slider.value.ToString();
|
||||
|
||||
slider.onValueChanged.AddListener(delegate
|
||||
{
|
||||
slider.wholeNumbers = true;
|
||||
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]);
|
||||
inputField.text = slider.value.ToString();
|
||||
parameterManager.entity[propertyName] = (int)slider.value;
|
||||
});
|
||||
|
||||
inputField.onSelect.AddListener(delegate
|
||||
{
|
||||
Editor.instance.editingInputField = true;
|
||||
});
|
||||
slider.onValueChanged.AddListener(
|
||||
_ =>
|
||||
{
|
||||
inputField.text = slider.value.ToString();
|
||||
parameterManager.entity[propertyName] = (int) slider.value;
|
||||
}
|
||||
);
|
||||
|
||||
inputField.onEndEdit.AddListener(delegate
|
||||
{
|
||||
slider.value = Mathf.RoundToInt(System.Convert.ToSingle(System.Convert.ToSingle(inputField.text)));
|
||||
parameterManager.entity[propertyName] = (int)slider.value;
|
||||
Editor.instance.editingInputField = false;
|
||||
});
|
||||
}
|
||||
else if (objType == typeof(EntityTypes.Float))
|
||||
{
|
||||
var fl = ((EntityTypes.Float)type);
|
||||
inputField.onSelect.AddListener(
|
||||
_ =>
|
||||
Editor.instance.editingInputField = true
|
||||
);
|
||||
|
||||
slider.minValue = fl.min;
|
||||
slider.maxValue = fl.max;
|
||||
inputField.onEndEdit.AddListener(
|
||||
_ =>
|
||||
{
|
||||
slider.value = Convert.ToSingle(inputField.text);
|
||||
parameterManager.entity[propertyName] = (int) slider.value;
|
||||
Editor.instance.editingInputField = false;
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
slider.value = System.Convert.ToSingle(parameterManager.entity[propertyName]);
|
||||
inputField.text = slider.value.ToString("G");
|
||||
case EntityTypes.Float fl:
|
||||
slider.minValue = fl.min;
|
||||
slider.maxValue = fl.max;
|
||||
|
||||
slider.onValueChanged.AddListener(delegate
|
||||
{
|
||||
var newValue = (float)System.Math.Round(slider.value, 4);
|
||||
inputField.text = newValue.ToString("G");
|
||||
parameterManager.entity[propertyName] = newValue;
|
||||
});
|
||||
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]);
|
||||
inputField.text = slider.value.ToString("G");
|
||||
|
||||
inputField.onSelect.AddListener(delegate
|
||||
{
|
||||
Editor.instance.editingInputField = true;
|
||||
});
|
||||
slider.onValueChanged.AddListener(
|
||||
_ =>
|
||||
{
|
||||
var newValue = (float) Math.Round(slider.value, 4);
|
||||
inputField.text = newValue.ToString("G");
|
||||
parameterManager.entity[propertyName] = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
inputField.onEndEdit.AddListener(delegate
|
||||
{
|
||||
slider.value = (float)System.Math.Round(System.Convert.ToSingle(inputField.text), 4);
|
||||
parameterManager.entity[propertyName] = slider.value;
|
||||
Editor.instance.editingInputField = false;
|
||||
});
|
||||
}
|
||||
else if(type is bool)
|
||||
{
|
||||
toggle.isOn = System.Convert.ToBoolean(parameterManager.entity[propertyName]); // ' (bool)type ' always results in false
|
||||
inputField.onSelect.AddListener(
|
||||
_ =>
|
||||
Editor.instance.editingInputField = true
|
||||
);
|
||||
|
||||
toggle.onValueChanged.AddListener(delegate
|
||||
{
|
||||
parameterManager.entity[propertyName] = toggle.isOn;
|
||||
});
|
||||
}
|
||||
else if (objType.IsEnum)
|
||||
{
|
||||
List<TMP_Dropdown.OptionData> dropDownData = new List<TMP_Dropdown.OptionData>();
|
||||
var vals = Enum.GetValues(objType);
|
||||
var selected = 0;
|
||||
for (int i = 0; i < vals.Length; i++)
|
||||
{
|
||||
string name = Enum.GetNames(objType)[i];
|
||||
TMP_Dropdown.OptionData optionData = new TMP_Dropdown.OptionData();
|
||||
inputField.onEndEdit.AddListener(
|
||||
_ =>
|
||||
{
|
||||
slider.value = (float) Math.Round(Convert.ToSingle(inputField.text), 4);
|
||||
parameterManager.entity[propertyName] = slider.value;
|
||||
Editor.instance.editingInputField = false;
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
optionData.text = name;
|
||||
case bool _:
|
||||
// ' (bool)type ' always results in false
|
||||
toggle.isOn = Convert.ToBoolean(parameterManager.entity[propertyName]);
|
||||
|
||||
dropDownData.Add(optionData);
|
||||
toggle.onValueChanged.AddListener(
|
||||
_ => parameterManager.entity[propertyName] = toggle.isOn
|
||||
);
|
||||
break;
|
||||
|
||||
if ((int)vals.GetValue(i) == (int)parameterManager.entity[propertyName])
|
||||
selected = i;
|
||||
}
|
||||
dropdown.AddOptions(dropDownData);
|
||||
dropdown.value = selected;
|
||||
|
||||
dropdown.onValueChanged.AddListener(delegate
|
||||
{
|
||||
parameterManager.entity[propertyName] = (int)Enum.GetValues(objType).GetValue(dropdown.value);
|
||||
});
|
||||
}
|
||||
else if (objType == typeof(Color))
|
||||
{
|
||||
colorPreview.colorPicker.onColorChanged += delegate
|
||||
{
|
||||
parameterManager.entity[propertyName] = (Color)colorPreview.colorPicker.color;
|
||||
};
|
||||
case Color _:
|
||||
colorPreview.colorPicker.onColorChanged += _ =>
|
||||
parameterManager.entity[propertyName] = colorPreview.colorPicker.color;
|
||||
|
||||
Color paramCol = (Color)parameterManager.entity[propertyName];
|
||||
var paramCol = (Color) parameterManager.entity[propertyName];
|
||||
|
||||
ColorBTN.onClick.AddListener(
|
||||
() =>
|
||||
{
|
||||
ColorTable.gameObject.SetActive(true);
|
||||
colorTableActive = true;
|
||||
colorPreview.ChangeColor(paramCol);
|
||||
}
|
||||
);
|
||||
|
||||
ColorBTN.onClick.AddListener(delegate
|
||||
{
|
||||
ColorTable.gameObject.SetActive(true);
|
||||
colorTableActive = true;
|
||||
colorPreview.ChangeColor(paramCol);
|
||||
});
|
||||
ColorTable.gameObject.SetActive(false);
|
||||
break;
|
||||
|
||||
colorPreview.ChangeColor(paramCol);
|
||||
ColorTable.gameObject.SetActive(false);
|
||||
}
|
||||
//why the FUCK wasn't this a thing before lmao
|
||||
else if(objType == typeof(string))
|
||||
{
|
||||
// Debug.Log("entity " + propertyName + " is: " + (string)(parameterManager.entity[propertyName]));
|
||||
inputFieldString.text = (string)(parameterManager.entity[propertyName]);
|
||||
case string _:
|
||||
inputFieldString.text = (string) parameterManager.entity[propertyName];
|
||||
|
||||
inputFieldString.onSelect.AddListener(delegate
|
||||
{
|
||||
Editor.instance.editingInputField = true;
|
||||
});
|
||||
inputFieldString.onSelect.AddListener(
|
||||
_ =>
|
||||
Editor.instance.editingInputField = true
|
||||
);
|
||||
inputFieldString.onEndEdit.AddListener(
|
||||
_ =>
|
||||
{;
|
||||
parameterManager.entity[propertyName] = inputFieldString.text;
|
||||
Editor.instance.editingInputField = false;
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
inputFieldString.onEndEdit.AddListener(delegate
|
||||
{
|
||||
// Debug.Log("setting " + propertyName + " to: " + inputFieldString.text);
|
||||
parameterManager.entity[propertyName] = inputFieldString.text;
|
||||
Editor.instance.editingInputField = false;
|
||||
});
|
||||
case Enum enumKind:
|
||||
var enumType = enumKind.GetType();
|
||||
var enumVals = Enum.GetValues(enumType);
|
||||
var enumNames = Enum.GetNames(enumType).ToList();
|
||||
|
||||
// Can we assume non-holey enum?
|
||||
// If we can we can simplify to dropdown.value = (int) parameterManager.entity[propertyName]
|
||||
var currentlySelected = (int) parameterManager.entity[propertyName];
|
||||
var selected = enumVals
|
||||
.Cast<object>()
|
||||
.ToList()
|
||||
.FindIndex(val => (int) val == currentlySelected);
|
||||
|
||||
dropdown.AddOptions(enumNames);
|
||||
dropdown.value = selected;
|
||||
|
||||
dropdown.onValueChanged.AddListener(_ =>
|
||||
parameterManager.entity[propertyName] = (int) enumVals.GetValue(dropdown.value)
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(
|
||||
nameof(type), type, "I don't know how to make a property of this type!"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,13 @@ namespace HeavenStudio
|
|||
new Minigame("gameManager", "Game Manager", "", false, true, new List<GameAction>()
|
||||
{
|
||||
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("end", delegate {
|
||||
Debug.Log("end");
|
||||
if (Timeline.instance != null)
|
||||
Timeline.instance?.Stop(0);
|
||||
else
|
||||
GameManager.instance.Stop(0);
|
||||
}),
|
||||
new GameAction("skill star", delegate { }, 1f, true),
|
||||
|
||||
new GameAction("toggle inputs", delegate
|
||||
|
@ -332,10 +338,7 @@ namespace HeavenStudio
|
|||
new Param("ease", EasingFunction.Ease.Linear, "Ease")
|
||||
}, hidden: false ),
|
||||
|
||||
new GameAction("move camera", delegate
|
||||
{
|
||||
//TODO: move cam
|
||||
}, 1f, true, new List<Param>()
|
||||
new GameAction("move camera", delegate {}, 1f, true, new List<Param>()
|
||||
{
|
||||
new Param("valA", new EntityTypes.Float(-50, 50, 0), "Right / Left"),
|
||||
new Param("valB", new EntityTypes.Float(-50, 50, 0), "Up / Down"),
|
||||
|
@ -343,10 +346,7 @@ namespace HeavenStudio
|
|||
new Param("ease", EasingFunction.Ease.Linear, "Ease Type")
|
||||
} ),
|
||||
|
||||
new GameAction("rotate camera", delegate
|
||||
{
|
||||
//TODO: rot cam
|
||||
}, 1f, true, new List<Param>()
|
||||
new GameAction("rotate camera", delegate {}, 1f, true, new List<Param>()
|
||||
{
|
||||
new Param("valA", new EntityTypes.Integer(-360, 360, 0), "Pitch"),
|
||||
new Param("valB", new EntityTypes.Integer(-360, 360, 0), "Yaw"),
|
||||
|
@ -354,6 +354,12 @@ namespace HeavenStudio
|
|||
new Param("ease", EasingFunction.Ease.Linear, "Ease Type")
|
||||
} ),
|
||||
|
||||
new GameAction("screen shake", delegate {}, 1f, true, new List<Param>()
|
||||
{
|
||||
new Param("valA", new EntityTypes.Float(0, 10, 0), "Horizontal Intensity"),
|
||||
new Param("valB", new EntityTypes.Float(0, 10, 1), "Vertical Intensity")
|
||||
} ),
|
||||
|
||||
new GameAction("display textbox", delegate
|
||||
{
|
||||
}, 1f, true, new List<Param>()
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 3987467636
|
||||
CRC: 1516953164
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
|
|
Binary file not shown.
|
@ -1,12 +1,12 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 3318721259
|
||||
CRC: 1091441775
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 4cfac5e8dc99494dc00682c7557b48a9
|
||||
Hash: f85b652eadac4ff300c579adfa67313b
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: b85016ff9dcfb2997245f008dd1f64b6
|
||||
Hash: 2b92e6f111bbb24dabe3a2c56ea02b28
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
|
@ -29,10 +29,10 @@ ClassTypes:
|
|||
Script: {instanceID: 0}
|
||||
- Class: 95
|
||||
Script: {instanceID: 0}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: 3f1678e3fe1b7c94f9a1558cfd247853, type: 3}
|
||||
- Class: 114
|
||||
|
@ -91,11 +91,13 @@ Assets:
|
|||
- Assets/Resources/Sprites/Games/KarateMan/anime/item/Item03.anim
|
||||
- Assets/Resources/Sprites/Games/KarateMan/effect/barrelWoodRecolorable.png
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/item/Item09.anim
|
||||
- Assets/Resources/Sfx/games/karateman/gogoSwitch.ogg
|
||||
- Assets/Resources/Sfx/games/karateman/nori_ng.wav
|
||||
- Assets/Resources/Sprites/Games/KarateMan/effect/potStar.png
|
||||
- Assets/Resources/Sprites/Games/KarateMan/effect/kickFragment.png
|
||||
- Assets/Resources/Sfx/games/karateman/swingKick.wav
|
||||
- Assets/Resources/Sprites/Games/KarateMan/effect/barrelWood.png
|
||||
- Assets/Resources/Sfx/games/karateman/gogo.ogg
|
||||
- Assets/Resources/Sfx/games/karateman/offbeatLightbulbOut.wav
|
||||
- Assets/Resources/Sprites/Games/KarateMan/karate_bg_sunburst_1.png
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/karateman/JabNoNuri.anim
|
||||
|
@ -134,6 +136,7 @@ Assets:
|
|||
- Assets/Resources/Sprites/Games/KarateMan/anime/word/Word04.anim
|
||||
- Assets/Resources/Sprites/Games/KarateMan/karate_bg_sunburst_2.png
|
||||
- Assets/Resources/Sprites/Games/KarateMan/karateman_nonurijab.mat
|
||||
- Assets/Resources/Sfx/games/karateman/rockHit_fullNori.wav
|
||||
- Assets/Resources/Sfx/games/karateman/lightbulbOut.ogg
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/word/Word06.anim
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/item/Item08.anim
|
||||
|
@ -166,6 +169,7 @@ Assets:
|
|||
- Assets/Resources/Sprites/Games/KarateMan/effect/karateman_bulbhit_fx_1.png
|
||||
- Assets/Resources/Sprites/Games/KarateMan/karateman_norimapping.mat
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/karateman/UpperCut.anim
|
||||
- Assets/Resources/Sfx/games/karateman/potHit_lowNori.wav
|
||||
- Assets/Resources/Sprites/Games/KarateMan/anime/item/HitMark.controller
|
||||
- Assets/Resources/Sfx/games/karateman/lightbulbHit.ogg
|
||||
- Assets/Resources/Sprites/Games/KarateMan/effect/krt_pot.mat
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 848712941
|
||||
CRC: 2094393231
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 0ef2ef396a224bdafb47a87a3665071f
|
||||
Hash: a425cbbebe1a8006a4fc4fe6127c84fa
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 6f0c5ebd30d7d3be8aad1c86837b5cc9
|
||||
|
|
Binary file not shown.
|
@ -1,12 +1,12 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 1510917746
|
||||
CRC: 3054716629
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: c8d19e801b0e1477237100154f79ddc7
|
||||
Hash: 7de7ed1ceb30a914c04951332a09f02e
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 50cf51288f63e2caccd9f845d8454555
|
||||
Hash: 788d5843115df613774b9a4b273d2334
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
|
@ -72,6 +72,7 @@ Assets:
|
|||
- Assets/Resources/Sfx/games/samuraiSliceNtr/ntrSamurai_catch.wav
|
||||
- Assets/Resources/Sfx/games/samuraiSliceNtr/holy_mackerel1.wav
|
||||
- Assets/Resources/Sprites/Games/SamuraiSliceNtr/Anime/Object/ObjDemon.anim
|
||||
- Assets/Resources/Sfx/games/samuraiSliceNtr/melon_dig.wav
|
||||
- Assets/Resources/Sprites/Games/SamuraiSliceNtr/ntr_samurai_obj.png
|
||||
- Assets/Resources/Sprites/Games/SamuraiSliceNtr/Anime/Launcher/UnStep.anim
|
||||
- Assets/Resources/Sprites/Games/SamuraiSliceNtr/Anime/Object/ObjDemonDebris01.anim
|
||||
|
|
Loading…
Reference in a new issue