mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-29 04:53:06 +00:00
Some facial expressions for Karate Man
This commit is contained in:
parent
5985e17ad8
commit
8268936e6d
10 changed files with 175 additions and 59 deletions
|
@ -31,6 +31,88 @@ Transform:
|
|||
m_Father: {fileID: 4148631055418481416}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &564650125393930190
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7677199528729525918}
|
||||
- component: {fileID: 868007046405604311}
|
||||
m_Layer: 0
|
||||
m_Name: MissEffect
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &7677199528729525918
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564650125393930190}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0.0016571856, w: 0.9999986}
|
||||
m_LocalPosition: {x: -3.03, y: 1.8, z: 0}
|
||||
m_LocalScale: {x: 0.58812755, y: 0.58812755, z: 0.58812755}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7248900333300803150}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -0.19}
|
||||
--- !u!212 &868007046405604311
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564650125393930190}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
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: 60
|
||||
m_Sprite: {fileID: -348202296468608855, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 5.2222223, y: 3.8888888}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1174851578296134715
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -290,6 +372,7 @@ MonoBehaviour:
|
|||
createBeat: 0
|
||||
isEligible: 0
|
||||
eligibleHitsList: []
|
||||
aceTimes: 0
|
||||
kicked: 0
|
||||
Holder: {fileID: 279641605354570890}
|
||||
RotHolder: {fileID: 7503168023327542540}
|
||||
|
@ -5712,7 +5795,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 8285689916985503547}
|
||||
m_Father: {fileID: 7248900333300803150}
|
||||
m_RootOrder: 11
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6693302166145137461
|
||||
GameObject:
|
||||
|
@ -6162,6 +6245,18 @@ MonoBehaviour:
|
|||
HitParticle: {fileID: 7248900332593533644}
|
||||
RockParticle: {fileID: 7248900332432276694}
|
||||
BulbHit: {fileID: 7248900333007582906}
|
||||
head: {fileID: 7248900332283351264}
|
||||
heads:
|
||||
- {fileID: 4149267612586432800, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 3060967690338004721, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 4866608027561499029, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -467025217388406215, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 2844288917660902187, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -4811965814584269873, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -3340168359885296488, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 3379959602278205485, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
missEffect: {fileID: 564650125393930190}
|
||||
hitBarrel: 0
|
||||
currentComboPots: []
|
||||
comboNormalizedBeat: 0
|
||||
|
@ -6918,6 +7013,7 @@ MonoBehaviour:
|
|||
createBeat: 0
|
||||
isEligible: 0
|
||||
eligibleHitsList: []
|
||||
aceTimes: 0
|
||||
startBeat: 0
|
||||
createBeat: 0
|
||||
anim: {fileID: 0}
|
||||
|
@ -17638,6 +17734,7 @@ Transform:
|
|||
- {fileID: 2035530467837460450}
|
||||
- {fileID: 634606877704519381}
|
||||
- {fileID: 6013960276080899241}
|
||||
- {fileID: 7677199528729525918}
|
||||
- {fileID: 7581330309301576633}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
|
|
|
@ -814,4 +814,11 @@ AnimationClip:
|
|||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: SetHead
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
|
|
|
@ -1458,4 +1458,11 @@ AnimationClip:
|
|||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: SetHead
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
|
|
|
@ -218,13 +218,6 @@ AnimationClip:
|
|||
classID: 1
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: Head
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 5131679410369794127, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
|
@ -281,13 +274,6 @@ AnimationClip:
|
|||
typeID: 1
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 130111906
|
||||
attribute: 0
|
||||
script: {fileID: 0}
|
||||
typeID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
- serializedVersion: 2
|
||||
path: 3561792701
|
||||
attribute: 0
|
||||
|
@ -345,7 +331,6 @@ AnimationClip:
|
|||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 5131679410369794127, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 8943939637534532364, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
|
@ -818,4 +803,11 @@ AnimationClip:
|
|||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: SetHead
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 8
|
||||
messageOptions: 0
|
||||
|
|
|
@ -492,13 +492,6 @@ AnimationClip:
|
|||
classID: 1
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: Head
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: -2636709571086610862, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
|
@ -671,13 +664,6 @@ AnimationClip:
|
|||
typeID: 1
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- serializedVersion: 2
|
||||
path: 130111906
|
||||
attribute: 0
|
||||
script: {fileID: 0}
|
||||
typeID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
- serializedVersion: 2
|
||||
path: 3561792701
|
||||
attribute: 0
|
||||
|
@ -693,7 +679,6 @@ AnimationClip:
|
|||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
pptrCurveMapping:
|
||||
- {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: -2636709571086610862, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 8132349032079424561, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
- {fileID: 2873506237420579991, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
|
||||
|
@ -1962,4 +1947,18 @@ AnimationClip:
|
|||
script: {fileID: 0}
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: SetHead
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 8
|
||||
messageOptions: 0
|
||||
- time: 0.5
|
||||
functionName: SetHead
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
|
|
Binary file not shown.
|
@ -7970,8 +7970,8 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: f86858990a87c764892672104bdaef1f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
level: {fileID: 4900000, guid: fafaeee85f4121643a0699a4de97da53, type: 3}
|
||||
music: {fileID: 8300000, guid: a0589cdba27fb254e90da17b4804c2fe, type: 3}
|
||||
level: {fileID: 4900000, guid: 5e794baa94fb06d4f939aaf032fab5ea, type: 3}
|
||||
music: {fileID: 8300000, guid: f3b9f9179bad8394a98f617bda265a62, type: 3}
|
||||
debugUI: 0
|
||||
playOnStart: 0
|
||||
editor: 1
|
||||
|
@ -11111,15 +11111,6 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a66fbd5ffe9b9d64da304996f1919f40, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_width: 1920
|
||||
_height: 1080
|
||||
_preset: 0
|
||||
_frameRate: 60
|
||||
_tempRT: {fileID: 0}
|
||||
_blitter: {fileID: 0}
|
||||
_frameCount: 0
|
||||
_startTime: 0
|
||||
_frameDropCount: 0
|
||||
--- !u!114 &2047408678
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11132,10 +11123,6 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: e55bddfe16e69224c8c4b4eb165695d4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_frameRate: 60
|
||||
_offlineMode: 1
|
||||
_originalFrameRate: 0
|
||||
_originalVSyncCount: 0
|
||||
--- !u!1 &2066632679
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -8,31 +8,29 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
{
|
||||
public class KarateJoe : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("Components")]
|
||||
public Animator anim;
|
||||
|
||||
private int currentHitInList = 0;
|
||||
|
||||
public GameObject HitEffect;
|
||||
|
||||
[Header("Particles")]
|
||||
public ParticleSystem HitParticle;
|
||||
public ParticleSystem RockParticle;
|
||||
public GameObject BulbHit;
|
||||
[SerializeField] private SpriteRenderer head;
|
||||
[SerializeField] private Sprite[] heads;
|
||||
[SerializeField] private GameObject missEffect;
|
||||
|
||||
[Header("Properties")]
|
||||
public bool hitBarrel = false;
|
||||
public Coroutine kickC;
|
||||
|
||||
public Coroutine missC;
|
||||
private float barrelBeat;
|
||||
|
||||
private bool inCombo;
|
||||
private bool hitCombo;
|
||||
private float comboBeat;
|
||||
|
||||
public List<Pot> currentComboPots = new List<Pot>();
|
||||
private int comboPotIndex;
|
||||
private int currentComboHitInList;
|
||||
private int comboIndex;
|
||||
|
||||
public float comboNormalizedBeat = 0;
|
||||
|
||||
public static KarateJoe instance { get; set; }
|
||||
|
@ -294,5 +292,21 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
anim.Play(name, 0, 0);
|
||||
anim.speed = 1;
|
||||
}
|
||||
|
||||
public void SetHead(int index)
|
||||
{
|
||||
head.sprite = heads[index];
|
||||
}
|
||||
|
||||
public IEnumerator Miss()
|
||||
{
|
||||
// I couldn't find the sound for this
|
||||
GameObject miss = Instantiate(missEffect, missEffect.transform.parent);
|
||||
miss.SetActive(true);
|
||||
SetHead(2);
|
||||
yield return new WaitForSeconds(0.08f);
|
||||
Destroy(miss);
|
||||
SetHead(0);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -76,6 +76,7 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
GameObject pot = Instantiate(Pot);
|
||||
pot.transform.parent = Pot.transform.parent;
|
||||
|
||||
KarateJoe.instance.SetHead(0);
|
||||
|
||||
Pot p = pot.GetComponent<Pot>();
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
|
||||
public Vector2 endShadowThrowPos;
|
||||
|
||||
private int missTimes = 0;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
anim = GetComponent<Animator>();
|
||||
|
@ -139,6 +141,14 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
lastShadowX = Shadow.transform.localPosition.x;
|
||||
lastRot = Holder.transform.GetChild(0).eulerAngles.z;
|
||||
|
||||
if (combo && comboIndex == 0 || combo && comboIndex == 5 || !combo)
|
||||
if (normalizedBeat >= 2 && missTimes == 0)
|
||||
{
|
||||
if (KarateJoe.instance.missC != null) StopCoroutine(KarateJoe.instance.missC);
|
||||
KarateJoe.instance.missC = KarateJoe.instance.StartCoroutine(KarateJoe.instance.Miss());
|
||||
missTimes = 1;
|
||||
}
|
||||
|
||||
StateCheck(normalizedBeat);
|
||||
|
||||
if (!combo)
|
||||
|
@ -271,6 +281,8 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
{
|
||||
Jukebox.PlayOneShot("miss");
|
||||
|
||||
KarateJoe.instance.SetHead(3);
|
||||
|
||||
NewHolder();
|
||||
Holder.transform.parent = newHolder.transform;
|
||||
|
||||
|
|
Loading…
Reference in a new issue