explodes
👼
This commit is contained in:
parent
5f22c651db
commit
376bbcdc9e
|
|
@ -136,7 +136,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 151360738741628551}
|
m_GameObject: {fileID: 151360738741628551}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: -1.23, z: 0}
|
m_LocalPosition: {x: -19.8, y: -1.2, z: 0}
|
||||||
m_LocalScale: {x: 0.6415348, y: 0.6415348, z: 0.6415348}
|
m_LocalScale: {x: 0.6415348, y: 0.6415348, z: 0.6415348}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -184,15 +184,15 @@ SpriteRenderer:
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 25
|
m_SortingOrder: 25
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4224877059003839859, guid: adbc5b443bdc23e469209cc4f602d17d, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
m_DrawMode: 0
|
m_DrawMode: 0
|
||||||
m_Size: {x: 6.92, y: 1.8}
|
m_Size: {x: 4.947496, y: 1.9589579}
|
||||||
m_AdaptiveModeThreshold: 0.5
|
m_AdaptiveModeThreshold: 0.5
|
||||||
m_SpriteTileMode: 0
|
m_SpriteTileMode: 0
|
||||||
m_WasSpriteAssigned: 0
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!114 &409730438988014783
|
--- !u!114 &409730438988014783
|
||||||
|
|
@ -221,7 +221,7 @@ Animator:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 151360738741628551}
|
m_GameObject: {fileID: 151360738741628551}
|
||||||
m_Enabled: 1
|
m_Enabled: 0
|
||||||
m_Avatar: {fileID: 0}
|
m_Avatar: {fileID: 0}
|
||||||
m_Controller: {fileID: 9100000, guid: a9399fbaa9737da46a5b5358c304c50d, type: 2}
|
m_Controller: {fileID: 9100000, guid: a9399fbaa9737da46a5b5358c304c50d, type: 2}
|
||||||
m_CullingMode: 0
|
m_CullingMode: 0
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,5 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!1102 &-3570823828933063337
|
|
||||||
AnimatorState:
|
|
||||||
serializedVersion: 6
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: MeatThrown
|
|
||||||
m_Speed: 1
|
|
||||||
m_CycleOffset: 0
|
|
||||||
m_Transitions: []
|
|
||||||
m_StateMachineBehaviours: []
|
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
|
||||||
m_IKOnFeet: 0
|
|
||||||
m_WriteDefaultValues: 0
|
|
||||||
m_Mirror: 0
|
|
||||||
m_SpeedParameterActive: 0
|
|
||||||
m_MirrorParameterActive: 0
|
|
||||||
m_CycleOffsetParameterActive: 0
|
|
||||||
m_TimeParameterActive: 0
|
|
||||||
m_Motion: {fileID: 7400000, guid: 2f1859638009cff48a2f8c9a3bcdb826, type: 2}
|
|
||||||
m_Tag:
|
|
||||||
m_SpeedParameter:
|
|
||||||
m_MirrorParameter:
|
|
||||||
m_CycleOffsetParameter:
|
|
||||||
m_TimeParameter:
|
|
||||||
--- !u!1102 &-2729320037363072411
|
--- !u!1102 &-2729320037363072411
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
|
@ -92,9 +66,6 @@ AnimatorStateMachine:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -2729320037363072411}
|
m_State: {fileID: -2729320037363072411}
|
||||||
m_Position: {x: 320, y: 240, z: 0}
|
m_Position: {x: 320, y: 240, z: 0}
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: -3570823828933063337}
|
|
||||||
m_Position: {x: 440, y: 180, z: 0}
|
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
@ -125,7 +96,7 @@ AnimatorState:
|
||||||
m_MirrorParameterActive: 0
|
m_MirrorParameterActive: 0
|
||||||
m_CycleOffsetParameterActive: 0
|
m_CycleOffsetParameterActive: 0
|
||||||
m_TimeParameterActive: 0
|
m_TimeParameterActive: 0
|
||||||
m_Motion: {fileID: 7400000, guid: 29b550105d0cd9c4fa47fb4df72fb7cc, type: 2}
|
m_Motion: {fileID: 0}
|
||||||
m_Tag:
|
m_Tag:
|
||||||
m_SpeedParameter:
|
m_SpeedParameter:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
|
||||||
private string meatTypeStr;
|
private string meatTypeStr;
|
||||||
private bool isHit = false;
|
private bool isHit = false;
|
||||||
|
|
||||||
|
// const float meatStart = 0;
|
||||||
|
// const float meatEnd = 3.43f;
|
||||||
|
|
||||||
[Header("Animators")]
|
[Header("Animators")]
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
private SpriteRenderer sr;
|
private SpriteRenderer sr;
|
||||||
|
|
@ -34,6 +37,7 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
|
||||||
game = MeatGrinder.instance;
|
game = MeatGrinder.instance;
|
||||||
anim = GetComponent<Animator>();
|
anim = GetComponent<Animator>();
|
||||||
sr = GetComponent<SpriteRenderer>();
|
sr = GetComponent<SpriteRenderer>();
|
||||||
|
anim.writeDefaultValuesOnDisable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
@ -53,13 +57,18 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
|
||||||
// }
|
// }
|
||||||
Debug.Log(sr.sprite.name);
|
Debug.Log(sr.sprite.name);
|
||||||
if (!isHit) {
|
if (!isHit) {
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 1.1);
|
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 1);
|
||||||
anim.DoNormalizedAnimation("MeatThrown", normalizedBeat);
|
float newX = Mathf.LerpUnclamped(-14f, 1.7f, normalizedBeat);
|
||||||
|
Debug.Log(newX);
|
||||||
|
transform.position = new Vector3(newX, -1.2f);
|
||||||
|
|
||||||
|
// anim.DoNormalizedAnimation("MeatThrown", normalizedBeat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Hit(PlayerActionEvent caller, float state)
|
private void Hit(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
anim.enabled = true;
|
||||||
isHit = true;
|
isHit = true;
|
||||||
game.TackAnim.SetBool("tackMeated", false);
|
game.TackAnim.SetBool("tackMeated", false);
|
||||||
anim.DoScaledAnimationAsync(meatTypeStr + "Hit", 0.5f);
|
anim.DoScaledAnimationAsync(meatTypeStr + "Hit", 0.5f);
|
||||||
|
|
@ -73,6 +82,7 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
|
||||||
|
|
||||||
private void Miss(PlayerActionEvent caller)
|
private void Miss(PlayerActionEvent caller)
|
||||||
{
|
{
|
||||||
|
anim.enabled = true;
|
||||||
game.bossAnnoyed = true;
|
game.bossAnnoyed = true;
|
||||||
SoundByte.PlayOneShotGame("meatGrinder/miss");
|
SoundByte.PlayOneShotGame("meatGrinder/miss");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue