big ball implementation 2
This commit is contained in:
parent
dfdde51d5d
commit
d8eaf4b995
|
|
@ -72,7 +72,7 @@ SpriteRenderer:
|
|||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 70
|
||||
m_SortingOrder: 71
|
||||
m_Sprite: {fileID: -460624202, guid: fcfd407e5f13b65499ef59b3777db34c, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
|
|
@ -222,8 +222,9 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
_logSR: {fileID: 8098522755323641548}
|
||||
_logCutSprite: {fileID: 192267312, guid: 8e17e4341f5f44e44b892a9c0cacc5ba, type: 3}
|
||||
_ballSR: {fileID: 6319426971838379636}
|
||||
_ballSR1: {fileID: 34877173387253755}
|
||||
_ballCutSprite: {fileID: 1488283434, guid: fcfd407e5f13b65499ef59b3777db34c, type: 3}
|
||||
_ballSR2: {fileID: 6319426971838379636}
|
||||
--- !u!114 &-6887511602651794248
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -168,6 +168,90 @@ SpriteRenderer:
|
|||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &222313140988381960
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3323409427255834296}
|
||||
- component: {fileID: 4609448886305163883}
|
||||
m_Layer: 0
|
||||
m_Name: guy
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3323409427255834296
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 222313140988381960}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.1, y: 0.06, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2110928556779588321}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4609448886305163883
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 222313140988381960}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 71
|
||||
m_Sprite: {fileID: -460624202, guid: fcfd407e5f13b65499ef59b3777db34c, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 3.86, y: 4.7}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &448050475756096169
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -505,6 +589,90 @@ SpriteRenderer:
|
|||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &2513478957201429355
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2431725877885406094}
|
||||
- component: {fileID: 8749453361847004020}
|
||||
m_Layer: 0
|
||||
m_Name: dough
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2431725877885406094
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2513478957201429355}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 2.347, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2110928556779588321}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8749453361847004020
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2513478957201429355}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 70
|
||||
m_Sprite: {fileID: -231943651, guid: fcfd407e5f13b65499ef59b3777db34c, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 3.86, y: 4.7}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &3277357031263482432
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1167,7 +1335,9 @@ Transform:
|
|||
m_LocalPosition: {x: 0.13, y: -1.29, z: 0}
|
||||
m_LocalScale: {x: 0.5710666, y: 0.5710666, z: 0.5710666}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 2431725877885406094}
|
||||
- {fileID: 3323409427255834296}
|
||||
m_Father: {fileID: 8855434573853191878}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d96bfa4b2dac9844eb9ab0b49955e9ea
|
||||
guid: 0551c41ea8c76d145b5bf0cecea789a1
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
[Header("Components")]
|
||||
[SerializeField] private SpriteRenderer _logSR;
|
||||
[SerializeField] private Sprite _logCutSprite;
|
||||
[SerializeField] private SpriteRenderer _ballSR;
|
||||
[SerializeField] private SpriteRenderer _ballSR1;
|
||||
[SerializeField] private Sprite _ballCutSprite;
|
||||
[SerializeField] private SpriteRenderer _ballSR2;
|
||||
|
||||
private LBJBear _bear;
|
||||
private LBJObjectRotate _rotateObject;
|
||||
|
|
@ -29,7 +30,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
{
|
||||
_rotateObject = GetComponent<LBJObjectRotate>();
|
||||
_logSR.gameObject.SetActive(false);
|
||||
_ballSR.gameObject.SetActive(false);
|
||||
_ballSR2.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Init(LBJBear bear, double beat, double length, LumBEARjack.BigType type, bool right, double startUpBeat = -1)
|
||||
|
|
@ -47,7 +48,8 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
_logSR.gameObject.SetActive(true);
|
||||
break;
|
||||
case LumBEARjack.BigType.bigBall:
|
||||
_ballSR.gameObject.SetActive(true);
|
||||
_ballSR1.gameObject.SetActive(true);
|
||||
_ballSR2.gameObject.SetActive(true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +58,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
{
|
||||
_rotationBeat = beat + (length / 4 * 3);
|
||||
_logSR.sprite = _logCutSprite;
|
||||
_ballSR.sprite = _ballCutSprite;
|
||||
_ballSR1.sprite = _ballCutSprite;
|
||||
}
|
||||
_cutActionEvent = LumBEARjack.instance.ScheduleInput(beat, length / 4 * 3, Minigame.InputAction_BasicPress, JustCut, Miss, Blank);
|
||||
Update();
|
||||
|
|
@ -107,7 +109,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
_bear.CutMid();
|
||||
_rotationBeat = _cutActionEvent.startBeat + _cutActionEvent.timer;
|
||||
_logSR.sprite = _logCutSprite;
|
||||
_ballSR.sprite = _ballCutSprite;
|
||||
_ballSR1.sprite = _ballCutSprite;
|
||||
}
|
||||
|
||||
private void JustCut(PlayerActionEvent caller, float state)
|
||||
|
|
@ -129,7 +131,8 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
LumBEARjack.BigType.bigBall => "bigBallCut",
|
||||
_ => throw new System.NotImplementedException(),
|
||||
};
|
||||
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
||||
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound, -1, 1, (_type == LumBEARjack.BigType.bigBall) ? 2 : 1);
|
||||
if (_type == LumBEARjack.BigType.bigBall) SoundByte.PlayOneShotGame("lumbearjack/bigBallHit", -1, 1.5f);
|
||||
_bear.Cut(caller.startBeat + caller.timer, false, false);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
|
@ -145,7 +148,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
SpriteRenderer sr = _type switch
|
||||
{
|
||||
LumBEARjack.BigType.log => _logSR,
|
||||
LumBEARjack.BigType.bigBall => _ballSR,
|
||||
LumBEARjack.BigType.bigBall => _ballSR2,
|
||||
_ => throw new System.NotImplementedException(),
|
||||
};
|
||||
LumBEARjack.instance.ActivateMissEffect(sr.transform, sr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue