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