fix unstep
add notes for splat
This commit is contained in:
parent
199eb30767
commit
3e66554c8f
|
|
@ -25,7 +25,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 242650971261648434}
|
m_GameObject: {fileID: 242650971261648434}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -1.56, y: -5.02643, z: 0}
|
m_LocalPosition: {x: -1.58, y: -3.95, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -46,8 +46,8 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
curve: {fileID: 1462365472650033565}
|
curve: {fileID: 1462365472650033565}
|
||||||
handleType: 0
|
handleType: 0
|
||||||
leftHandleLocalPosition: {x: 0.31922793, y: 9.743333, z: 0}
|
leftHandleLocalPosition: {x: 0.6050268, y: 7.145598, z: 0}
|
||||||
rightHandleLocalPosition: {x: -0.31922793, y: -9.743333, z: -0}
|
rightHandleLocalPosition: {x: -0.6050268, y: -7.145598, z: -0}
|
||||||
--- !u!1 &290865376165074547
|
--- !u!1 &290865376165074547
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -6679,7 +6679,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1465141136420999014}
|
m_GameObject: {fileID: 1465141136420999014}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 6.26, y: -6.2500005, z: 0.1}
|
m_LocalPosition: {x: 5.91, y: -3.99, z: 0.1}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -6700,8 +6700,8 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
curve: {fileID: 9026471934783822949}
|
curve: {fileID: 9026471934783822949}
|
||||||
handleType: 0
|
handleType: 0
|
||||||
leftHandleLocalPosition: {x: -2.1442063, y: 13.031189, z: -0.24612674}
|
leftHandleLocalPosition: {x: -1.607199, y: 7.9403563, z: -0.24590993}
|
||||||
rightHandleLocalPosition: {x: 2.1442063, y: -13.031189, z: 0.24612674}
|
rightHandleLocalPosition: {x: 1.607199, y: -7.9403563, z: 0.24590993}
|
||||||
--- !u!1 &1658320474579320115
|
--- !u!1 &1658320474579320115
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -11839,7 +11839,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!4 &6530704449370969801
|
--- !u!4 &6530704449370969801
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -13699,7 +13699,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4322478051307581516}
|
m_GameObject: {fileID: 4322478051307581516}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -1.65, y: -5.02643, z: 0}
|
m_LocalPosition: {x: -1.55, y: -3.97, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -13720,8 +13720,8 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
curve: {fileID: 6708362649413049134}
|
curve: {fileID: 6708362649413049134}
|
||||||
handleType: 0
|
handleType: 0
|
||||||
leftHandleLocalPosition: {x: 0.06496096, y: 15.047452, z: 0}
|
leftHandleLocalPosition: {x: 0.59684163, y: 12.905908, z: 0}
|
||||||
rightHandleLocalPosition: {x: -0.06496096, y: -15.047452, z: -0}
|
rightHandleLocalPosition: {x: -0.59684163, y: -12.905908, z: -0}
|
||||||
--- !u!1 &4325196737611139723
|
--- !u!1 &4325196737611139723
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -13999,7 +13999,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4424107982687199078}
|
m_GameObject: {fileID: 4424107982687199078}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 4.19, y: -5.02643, z: 0}
|
m_LocalPosition: {x: 4.19, y: -3.98, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -14020,8 +14020,8 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
curve: {fileID: 8715086685139578075}
|
curve: {fileID: 8715086685139578075}
|
||||||
handleType: 0
|
handleType: 0
|
||||||
leftHandleLocalPosition: {x: -0.8012228, y: 7.716851, z: 0}
|
leftHandleLocalPosition: {x: -0.8989928, y: 6.6413665, z: 0}
|
||||||
rightHandleLocalPosition: {x: 0.8012228, y: -7.716851, z: -0}
|
rightHandleLocalPosition: {x: 0.8989928, y: -6.6413665, z: -0}
|
||||||
--- !u!1 &4640007250778429563
|
--- !u!1 &4640007250778429563
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -18300,7 +18300,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 9074423555571807762}
|
m_GameObject: {fileID: 9074423555571807762}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 2.4470143, y: -5.429279, z: 0}
|
m_LocalPosition: {x: 2.4470143, y: -4.74, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ AnimatorStateTransition:
|
||||||
m_IsExit: 0
|
m_IsExit: 0
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransitionDuration: 0
|
m_TransitionDuration: 0
|
||||||
m_TransitionOffset: 15
|
m_TransitionOffset: 0
|
||||||
m_ExitTime: 1
|
m_ExitTime: 1
|
||||||
m_HasExitTime: 1
|
m_HasExitTime: 1
|
||||||
m_HasFixedDuration: 1
|
m_HasFixedDuration: 1
|
||||||
|
|
@ -48,7 +48,7 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1102 &-2793958347424135821
|
--- !u!1102 &-3167391570579844052
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
|
|
@ -148,8 +148,8 @@ AnimatorStateMachine:
|
||||||
m_State: {fileID: -5563777372090574972}
|
m_State: {fileID: -5563777372090574972}
|
||||||
m_Position: {x: 300, y: 290, z: 0}
|
m_Position: {x: 300, y: 290, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -2793958347424135821}
|
m_State: {fileID: -3167391570579844052}
|
||||||
m_Position: {x: 335, y: 355, z: 0}
|
m_Position: {x: 300, y: 350, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
|
||||||
|
|
@ -1066,7 +1066,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using HeavenStudio.Util;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace HeavenStudio.Games.Scripts_NtrSamurai
|
namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
|
|
@ -17,15 +18,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
stepping = false;
|
stepping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Bop()
|
public void Bop()
|
||||||
{
|
{
|
||||||
if (!stepping && !(animator.GetCurrentAnimatorClipInfo(0)[0].clip.name == "Slash"))
|
if (!stepping && !animator.IsPlayingAnimationNames("Beat", "Unstep", "Slash"))
|
||||||
animator.Play("Beat", -1, 0);
|
animator.Play("Beat", -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,11 +29,11 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
stepping = !off;
|
stepping = !off;
|
||||||
if (off)
|
if (off)
|
||||||
{
|
{
|
||||||
animator.Play("Beat", -1, 0);
|
animator.Play("Unstep", -1, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (animator.GetCurrentAnimatorClipInfo(0)[0].clip.name == "Slash")
|
if (animator.IsPlayingAnimationNames("Slash"))
|
||||||
animator.Play("StepSeathe", -1, 0);
|
animator.Play("StepSeathe", -1, 0);
|
||||||
else
|
else
|
||||||
animator.Play("Step", -1, 0);
|
animator.Play("Step", -1, 0);
|
||||||
|
|
@ -51,7 +46,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
animator.Play("Slash", -1, 0);
|
animator.Play("Slash", -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool isStepping()
|
public bool IsStepping()
|
||||||
{
|
{
|
||||||
return stepping;
|
return stepping;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
[Header("Transforms")]
|
[Header("Transforms")]
|
||||||
public Transform doubleLaunchPos;
|
public Transform doubleLaunchPos;
|
||||||
public Transform heldPos;
|
public Transform heldPos;
|
||||||
|
|
||||||
public double startBeat;
|
public double startBeat;
|
||||||
public int type;
|
public int type;
|
||||||
public bool isDebris = false;
|
public bool isDebris = false;
|
||||||
|
|
@ -39,13 +39,13 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Fish:
|
case (int)SamuraiSliceNtr.ObjectType.Fish:
|
||||||
anim.Play("ObjFishDebris");
|
anim.Play("ObjFishDebris");
|
||||||
break;
|
break;
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Demon:
|
case (int)SamuraiSliceNtr.ObjectType.Demon:
|
||||||
anim.Play("ObjDemonDebris02");
|
anim.Play("ObjDemonDebris02");
|
||||||
break;
|
break;
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Melon2B2T:
|
case (int)SamuraiSliceNtr.ObjectType.Melon2B2T:
|
||||||
anim.Play("ObjMelonPickelDebris02");
|
anim.Play("ObjMelonPickelDebris02");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -62,19 +62,19 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Fish:
|
case (int)SamuraiSliceNtr.ObjectType.Fish:
|
||||||
anim.Play("ObjFish");
|
anim.Play("ObjFish");
|
||||||
break;
|
break;
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Demon:
|
case (int)SamuraiSliceNtr.ObjectType.Demon:
|
||||||
anim.Play("ObjDemon");
|
anim.Play("ObjDemon");
|
||||||
|
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 1f, 1.5f),
|
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 1f, 1.5f),
|
||||||
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 1.5f, 1.25f),
|
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 1.5f, 1.25f),
|
||||||
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 2f),
|
new MultiSound.Sound("samuraiSliceNtr/ntrSamurai_in01", startBeat + 2f),
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Melon2B2T:
|
case (int)SamuraiSliceNtr.ObjectType.Melon2B2T:
|
||||||
anim.Play("ObjMelonPickel");
|
anim.Play("ObjMelonPickel");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -89,7 +89,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 1.75f, SamuraiSliceNtr.InputAction_AltUp, DoUnStepAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false;
|
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 1.75f, SamuraiSliceNtr.InputAction_AltUp, DoUnStepAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false;
|
||||||
|
|
||||||
currentCurve = SamuraiSliceNtr.instance.InCurve;
|
currentCurve = SamuraiSliceNtr.instance.InCurve;
|
||||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (360f * (float) startBeat));
|
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (360f * (float)startBeat));
|
||||||
|
|
||||||
var cond = Conductor.instance;
|
var cond = Conductor.instance;
|
||||||
float flyPos = cond.GetPositionFromBeat(launchProg.startBeat, 3f);
|
float flyPos = cond.GetPositionFromBeat(launchProg.startBeat, 3f);
|
||||||
|
|
@ -113,6 +113,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
|
|
||||||
if (flyPos > 1f)
|
if (flyPos > 1f)
|
||||||
{
|
{
|
||||||
|
// TODO: splat
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -124,12 +125,12 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
transform.position = heldPos.position;
|
// transform.position = heldPos.position;
|
||||||
break;
|
break;
|
||||||
case -1: // sliced by samurai, falling towards child
|
case -1: // sliced by samurai, falling towards child
|
||||||
flyPos = cond.GetPositionFromBeat(startBeat, 1f);
|
flyPos = cond.GetPositionFromBeat(startBeat, 1f);
|
||||||
transform.position = currentCurve.GetPoint(flyPos);
|
transform.position = currentCurve.GetPoint(flyPos);
|
||||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + ((isDebris? 360f : -360f) * Time.deltaTime));
|
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + ((isDebris ? 360f : -360f) * Time.deltaTime));
|
||||||
|
|
||||||
if (flyPos > 1f)
|
if (flyPos > 1f)
|
||||||
{
|
{
|
||||||
|
|
@ -138,7 +139,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
{
|
{
|
||||||
NtrSamuraiChild child = SamuraiSliceNtr.instance.CreateChild(startBeat + 1f);
|
NtrSamuraiChild child = SamuraiSliceNtr.instance.CreateChild(startBeat + 1f);
|
||||||
heldPos = child.DebrisPosR;
|
heldPos = child.DebrisPosR;
|
||||||
|
transform.parent = child.DebrisPosR;
|
||||||
secondHalf.heldPos = child.DebrisPosL;
|
secondHalf.heldPos = child.DebrisPosL;
|
||||||
|
secondHalf.transform.parent = child.DebrisPosL;
|
||||||
}
|
}
|
||||||
flyProg = -2;
|
flyProg = -2;
|
||||||
GetComponent<SpriteRenderer>().sortingOrder = 7;
|
GetComponent<SpriteRenderer>().sortingOrder = 7;
|
||||||
|
|
@ -148,13 +151,14 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
case 2: // fish first bounce
|
case 2: // fish first bounce
|
||||||
float jumpPos = cond.GetPositionFromBeat(launchProg.startBeat, 2f);
|
float jumpPos = cond.GetPositionFromBeat(launchProg.startBeat, 2f);
|
||||||
float yMul = jumpPos * 2f - 1f;
|
float yMul = jumpPos * 2f - 1f;
|
||||||
float yWeight = -(yMul*yMul) + 1f;
|
float yWeight = -(yMul * yMul) + 1f;
|
||||||
transform.position = doubleLaunchPos.position + new Vector3(0, 4.5f * yWeight);
|
transform.position = doubleLaunchPos.position + new Vector3(0, 4.5f * yWeight);
|
||||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (-2 * 360f * Time.deltaTime));
|
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (-2 * 360f * Time.deltaTime));
|
||||||
|
|
||||||
if (jumpPos > 2f)
|
if (jumpPos > 2f)
|
||||||
{
|
{
|
||||||
// missed...
|
// missed...
|
||||||
|
// TODO: splat
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +167,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
float flyDur = 3f;
|
float flyDur = 3f;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Demon:
|
case (int)SamuraiSliceNtr.ObjectType.Demon:
|
||||||
flyDur = 5f;
|
flyDur = 5f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -177,6 +181,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
if (flyPos > 1f)
|
if (flyPos > 1f)
|
||||||
{
|
{
|
||||||
// missed...
|
// missed...
|
||||||
|
// TODO: splat
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -190,6 +195,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
if (flyPos > 1f)
|
if (flyPos > 1f)
|
||||||
{
|
{
|
||||||
// missed...
|
// missed...
|
||||||
|
// TODO: splat
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -202,7 +208,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Fish:
|
case (int)SamuraiSliceNtr.ObjectType.Fish:
|
||||||
if (flyProg == 2)
|
if (flyProg == 2)
|
||||||
{
|
{
|
||||||
flyProg = 1;
|
flyProg = 1;
|
||||||
|
|
@ -210,9 +216,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 4f, 2f, SamuraiSliceNtr.InputAction_FlickPress, DoSliceAutoplay, LaunchThrough, LaunchThrough);
|
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 4f, 2f, SamuraiSliceNtr.InputAction_FlickPress, DoSliceAutoplay, LaunchThrough, LaunchThrough);
|
||||||
currentCurve = SamuraiSliceNtr.instance.LaunchCurve;
|
currentCurve = SamuraiSliceNtr.instance.LaunchCurve;
|
||||||
|
|
||||||
SoundByte.PlayOneShotGame("samuraiSliceNtr/holy_mackerel" + UnityEngine.Random.Range(1, 4), pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 1f/4);
|
SoundByte.PlayOneShotGame("samuraiSliceNtr/holy_mackerel" + UnityEngine.Random.Range(1, 4), pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 1f / 4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flyProg = 2;
|
flyProg = 2;
|
||||||
launchProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 2f, SamuraiSliceNtr.InputAction_AltDown, LaunchSuccess, LaunchMiss, LaunchThrough);
|
launchProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 2f, SamuraiSliceNtr.InputAction_AltDown, LaunchSuccess, LaunchMiss, LaunchThrough);
|
||||||
|
|
@ -224,7 +230,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
SoundByte.PlayOneShotGame("samuraiSliceNtr/holy_mackerel" + UnityEngine.Random.Range(1, 4), pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 0.8f);
|
SoundByte.PlayOneShotGame("samuraiSliceNtr/holy_mackerel" + UnityEngine.Random.Range(1, 4), pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 0.8f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (int) SamuraiSliceNtr.ObjectType.Demon:
|
case (int)SamuraiSliceNtr.ObjectType.Demon:
|
||||||
flyProg = 1;
|
flyProg = 1;
|
||||||
hitProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 4f, SamuraiSliceNtr.InputAction_FlickPress, HitSuccess, HitMiss, LaunchThrough);
|
hitProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 4f, SamuraiSliceNtr.InputAction_FlickPress, HitSuccess, HitMiss, LaunchThrough);
|
||||||
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 4f, SamuraiSliceNtr.InputAction_FlickPress, DoSliceAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false;
|
SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 4f, SamuraiSliceNtr.InputAction_FlickPress, DoSliceAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false;
|
||||||
|
|
@ -279,7 +285,7 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
missedLaunch = true;
|
missedLaunch = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LaunchThrough(PlayerActionEvent caller) {}
|
public void LaunchThrough(PlayerActionEvent caller) { }
|
||||||
|
|
||||||
public void HitSuccess(PlayerActionEvent caller, float state)
|
public void HitSuccess(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
|
@ -316,9 +322,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||||
secondHalf = mobjDat;
|
secondHalf = mobjDat;
|
||||||
|
|
||||||
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)
|
else if (type == (int)SamuraiSliceNtr.ObjectType.Melon2B2T)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("samuraiSliceNtr/melon_dig");
|
SoundByte.PlayOneShotGame("samuraiSliceNtr/melon_dig");
|
||||||
pickelBurst.Play();
|
pickelBurst.Play();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ namespace HeavenStudio.Games.Loaders
|
||||||
using static Minigames;
|
using static Minigames;
|
||||||
public static class NtrSamuraiLoader
|
public static class NtrSamuraiLoader
|
||||||
{
|
{
|
||||||
public static Minigame AddGame(EventCaller eventCaller) {
|
public static Minigame AddGame(EventCaller eventCaller)
|
||||||
|
{
|
||||||
return new Minigame("samuraiSliceNtr", "Samurai Slice (DS)", "b6b5b6", false, false, new List<GameAction>()
|
return new Minigame("samuraiSliceNtr", "Samurai Slice (DS)", "b6b5b6", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
|
|
@ -31,7 +32,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
function = delegate
|
function = delegate
|
||||||
{
|
{
|
||||||
SamuraiSliceNtr.instance.ObjectIn(eventCaller.currentEntity.beat, (int)SamuraiSliceNtr.ObjectType.Melon, (int) eventCaller.currentEntity["valA"], eventCaller.currentEntity["2b2t"]);
|
SamuraiSliceNtr.instance.ObjectIn(eventCaller.currentEntity.beat, (int)SamuraiSliceNtr.ObjectType.Melon, (int) eventCaller.currentEntity["valA"], eventCaller.currentEntity["2b2t"]);
|
||||||
},
|
},
|
||||||
defaultLength = 5,
|
defaultLength = 5,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
@ -79,9 +80,9 @@ namespace HeavenStudio.Games.Loaders
|
||||||
hidden = true
|
hidden = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new List<string>() {"ntr", "normal"},
|
new List<string>() { "ntr", "normal" },
|
||||||
"ntrsamurai", "en",
|
"ntrsamurai", "en",
|
||||||
new List<string>() {"en"}
|
new List<string>() { "en" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +95,8 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public class SamuraiSliceNtr : Minigame
|
public class SamuraiSliceNtr : Minigame
|
||||||
{
|
{
|
||||||
public enum ObjectType {
|
public enum ObjectType
|
||||||
|
{
|
||||||
Melon,
|
Melon,
|
||||||
Fish,
|
Fish,
|
||||||
Demon,
|
Demon,
|
||||||
|
|
@ -182,7 +184,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (PlayerInput.GetIsAction(InputAction_AltDown))
|
if (PlayerInput.GetIsAction(InputAction_AltDown))
|
||||||
DoStep();
|
DoStep();
|
||||||
if (PlayerInput.GetIsAction(InputAction_AltUp) && player.isStepping())
|
if (PlayerInput.GetIsAction(InputAction_AltUp) && player.IsStepping())
|
||||||
DoUnStep();
|
DoUnStep();
|
||||||
if (PlayerInput.GetIsAction(InputAction_FlickPress))
|
if (PlayerInput.GetIsAction(InputAction_FlickPress))
|
||||||
DoSlice();
|
DoSlice();
|
||||||
|
|
@ -229,12 +231,11 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
player.Step(true);
|
player.Step(true);
|
||||||
launcher.GetComponent<Animator>().Play("UnStep", -1, 0);
|
launcher.GetComponent<Animator>().Play("UnStep", -1, 0);
|
||||||
player.GetComponent<Animator>().Play("UnStep", -1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoSlice()
|
public void DoSlice()
|
||||||
{
|
{
|
||||||
if (player.isStepping())
|
if (player.IsStepping())
|
||||||
{
|
{
|
||||||
launcher.GetComponent<Animator>().Play("UnStep", -1, 0);
|
launcher.GetComponent<Animator>().Play("UnStep", -1, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -242,13 +243,13 @@ namespace HeavenStudio.Games
|
||||||
player.Slash();
|
player.Slash();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Bop(double beat, float length)
|
public void Bop(double beat, float length)
|
||||||
{
|
{
|
||||||
bop.length = length;
|
bop.length = length;
|
||||||
bop.startBeat = beat;
|
bop.startBeat = beat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ObjectIn(double beat, int type = (int) ObjectType.Melon, int value = 1, bool funnyMinecraft = false)
|
public void ObjectIn(double beat, int type = (int)ObjectType.Melon, int value = 1, bool funnyMinecraft = false)
|
||||||
{
|
{
|
||||||
var mobj = GameObject.Instantiate(objectPrefab, objectHolder);
|
var mobj = GameObject.Instantiate(objectPrefab, objectHolder);
|
||||||
var mobjDat = mobj.GetComponent<NtrSamuraiObject>();
|
var mobjDat = mobj.GetComponent<NtrSamuraiObject>();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue