implemented multi eyed monster

This commit is contained in:
Adam Salah 2025-07-30 03:13:44 -04:00
parent 0eb512710f
commit 92e393de42
27 changed files with 1639 additions and 936 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0d6ea36ca7e1a694eb6fae82a83f291f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,148 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1109 &-7749928769462892932
AnimatorTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 555590324344545607}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 1
--- !u!1102 &-5041891731019944183
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: multieyed_eye_explosion
m_Speed: 3
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 93bbe47c36eca8b44974ca26b29597f2, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: multieyed_eye_0
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Destroy
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 4093238649756968589}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &555590324344545607
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 8793072365789718719}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &4093238649756968589
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 555590324344545607}
m_Position: {x: 280, y: 100, z: 0}
- serializedVersion: 1
m_State: {fileID: -5041891731019944183}
m_Position: {x: 570, y: 140, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions:
- {fileID: -7749928769462892932}
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 60, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 555590324344545607}
--- !u!1101 &8793072365789718719
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Destroy
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -5041891731019944183}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8a15b449685392446a776716ce7c6d8a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,96 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: multieyed_eye_explosion
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: -1387991523, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.083333336
value: {fileID: -1254532138, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.16666667
value: {fileID: -973503813, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.25
value: {fileID: 918357668, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.33333334
value: {fileID: -804986931, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.41666666
value: {fileID: -1130557432, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.5
value: {fileID: -517827767, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- time: 0.5833333
value: {fileID: -440695060, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: -1387991523, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -1254532138, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -973503813, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: 918357668, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -804986931, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -1130557432, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -517827767, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
- {fileID: -440695060, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.6666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events:
- time: 0.6666667
functionName: DestroyEye
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 93bbe47c36eca8b44974ca26b29597f2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -21,7 +21,7 @@ AnimationClip:
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: -9.37}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
@ -38,7 +38,7 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
inSlope: {x: -0, y: -0, z: 9.37}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
@ -55,7 +55,7 @@ AnimationClip:
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 8.695}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
@ -72,7 +72,7 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
inSlope: {x: -0, y: -0, z: -8.695}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
@ -90,7 +90,7 @@ AnimationClip:
time: 0
value: {x: 0.000000033244206, y: 0.0000000221628, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0.013499984, y: 0.03699999, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
@ -107,7 +107,7 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: {x: 0.000000033244206, y: 0.0000000221628, z: 0}
inSlope: {x: 0, y: 0, z: 0}
inSlope: {x: -0.013499984, y: -0.03699999, z: -0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
@ -124,7 +124,7 @@ AnimationClip:
time: 0
value: {x: 0.00000003324421, y: 0.0000000221628, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
outSlope: {x: -0.012000017, y: -0.0135000115, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
@ -141,7 +141,7 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: {x: 0.00000003324421, y: 0.0000000221628, z: 0}
inSlope: {x: 0, y: 0, z: 0}
inSlope: {x: 0.012000017, y: 0.0135000115, z: -0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
@ -219,7 +219,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -235,9 +235,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -256,7 +256,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -272,9 +272,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -292,8 +292,8 @@ AnimationClip:
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: -9.37
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -309,9 +309,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: 9.37
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -329,8 +329,8 @@ AnimationClip:
time: 0
value: 0.000000033244206
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: 0.013499984
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -346,9 +346,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0.000000033244206
inSlope: 0
inSlope: -0.013499984
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -366,8 +366,8 @@ AnimationClip:
time: 0
value: 0.0000000221628
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: 0.03699999
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -383,9 +383,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0.0000000221628
inSlope: 0
inSlope: -0.03699999
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -404,7 +404,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -420,9 +420,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -441,7 +441,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -457,9 +457,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -478,7 +478,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -494,9 +494,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -514,8 +514,8 @@ AnimationClip:
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: 8.695
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -531,9 +531,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -8.695
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -551,8 +551,8 @@ AnimationClip:
time: 0
value: 0.00000003324421
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: -0.012000017
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -568,9 +568,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0.00000003324421
inSlope: 0
inSlope: 0.012000017
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -588,8 +588,8 @@ AnimationClip:
time: 0
value: 0.0000000221628
inSlope: 0
outSlope: 0
tangentMode: 136
outSlope: -0.0135000115
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -605,9 +605,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0.0000000221628
inSlope: 0
inSlope: 0.0135000115
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -626,7 +626,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -642,9 +642,9 @@ AnimationClip:
- serializedVersion: 3
time: 4
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@ -663,6 +663,36 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: multieyed_arm1
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: multieyed_arm1
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: multieyed_arm1
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: multieyed_arm2
classID: 4
script: {fileID: 0}
@ -676,16 +706,6 @@ AnimationClip:
path: multieyed_arm2
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: multieyed_arm2
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -693,27 +713,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: multieyed_arm1
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: multieyed_arm1
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: multieyed_arm1
path: multieyed_arm2
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -42,7 +42,7 @@ TextureImporter:
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 9
@ -103,7 +103,175 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: multieyed_eye_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d73efeefadf126647a02b5ffd1d63248
internalID: -1387991523
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_1
rect:
serializedVersion: 2
x: 36
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 373898c68e24a9041b6084a7c4d8e220
internalID: -1254532138
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_2
rect:
serializedVersion: 2
x: 72
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 368132878ec068b4eae52c2121bd26df
internalID: -973503813
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_3
rect:
serializedVersion: 2
x: 108
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: ae049789c09b2094a89b34c384889af7
internalID: 918357668
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_4
rect:
serializedVersion: 2
x: 144
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2239fa76a5a7b21478f6835f6fe41c90
internalID: -804986931
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_5
rect:
serializedVersion: 2
x: 180
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 1bd98e7c5489612469feb609ef224600
internalID: -1130557432
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_6
rect:
serializedVersion: 2
x: 216
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 952c5ec4989b52b49818971385dc3fd5
internalID: -517827767
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: multieyed_eye_7
rect:
serializedVersion: 2
x: 252
y: 0
width: 36
height: 36
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2fbe0eed37df1854fb523f6fefab5b27
internalID: -440695060
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
@ -114,7 +282,15 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
nameFileIdTable:
multieyed_eye_0: -1387991523
multieyed_eye_1: -1254532138
multieyed_eye_2: -973503813
multieyed_eye_3: 918357668
multieyed_eye_4: -804986931
multieyed_eye_5: -1130557432
multieyed_eye_6: -517827767
multieyed_eye_7: -440695060
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0

View File

@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MultiEyedOpponentEye : MonoBehaviour
{
public void DestroyEye()
{
Destroy(gameObject);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ea5ffe23efac742489d990816e0a9d0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,121 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1553670687307187218
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5843383035450780422}
- component: {fileID: 8004211082550737960}
- component: {fileID: 6928236252735655021}
- component: {fileID: 7957743097731590818}
m_Layer: 0
m_Name: multieyed_eye
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5843383035450780422
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553670687307187218}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.9586668, y: 0, z: 0}
m_LocalScale: {x: 1.3333334, y: 1.3333334, z: 1.3333334}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8004211082550737960
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553670687307187218}
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: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
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: 0
m_Sprite: {fileID: -1387991523, guid: a7bba418584290545bf6b129a54eee7f, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.36, y: 0.36}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!95 &6928236252735655021
Animator:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553670687307187218}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 8a15b449685392446a776716ce7c6d8a, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &7957743097731590818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553670687307187218}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea5ffe23efac742489d990816e0a9d0d, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 09b235e4222a11c4596012dc860b6101
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 89dba5530c3943948a5f1f42ef63a9d0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +1,92 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;
public class MultiEyedOpponent : Opponent
{
[SerializeField]
private float _eyeMaxDistance = 2.0f;
[SerializeField]
private float _eyeSpeed = 3.0f;
[SerializeField]
private GameObject[] _eyes;
private int _eyeLossHpInterval;
private List<GameObject> _remainingEyes = new List<GameObject>();
// tuple: (eye instance, start position, distance to end of arc, point to stop mid arc, start angle, modulated speed)
private List<(GameObject eye ,float startX, float distance, float destination, float angle, float speed)> _dyingEyes =
new List<(GameObject eye, float startX, float distance, float destination, float angle, float speed)>();
public override void Start()
{
base.Start();
_remainingEyes.AddRange(_eyes);
_eyeLossHpInterval = Hp / _eyes.Length;
}
public override void Update()
{
base.Update();
// Check if Hp threshold for eye loss is reached
if (_remainingEyes.Count > Hp / _eyeLossHpInterval)
{
int i = Random.Range(0, _remainingEyes.Count);
var removedEye = _remainingEyes[i];
var dyingEye = Instantiate(removedEye, transform);
// Render in front of units
var renderer = dyingEye.GetComponent<SpriteRenderer>();
renderer.sortingLayerName = "Unit";
renderer.sortingOrder = 100;
// Setup launch params
float startX = dyingEye.transform.position.x;
float distance = Mathf.Sign(Random.Range(-1.0f, 1.0f)) * Random.Range(_eyeMaxDistance / 5, _eyeMaxDistance);
float destination = Random.Range(distance / 2, distance);
float angle = Random.Range(30.0f, 80.0f);
float speed = Mathf.Sqrt(90 * 90 - angle * angle) / 90 * _eyeSpeed;
_dyingEyes.Add((dyingEye, startX, distance, destination, angle, speed));
// Remove from remaining eyes
_remainingEyes.RemoveAt(i);
removedEye.SetActive(false);
}
// Update dying eyes position
foreach (var entry in _dyingEyes)
{
var eye = entry.eye;
if (!eye) continue;
// Get tuple launch params
float startX = entry.startX;
float distance = entry.distance;
float destination = entry.destination;
float angle = entry.angle;
float speed = entry.speed;
// Arc function
float k = Mathf.Sign(distance) * Mathf.Tan(angle * Mathf.Deg2Rad);
float a = -1.0f / distance;
float x = (eye.transform.position.x - startX) + Mathf.Sign(distance) * speed * Time.deltaTime;
float y = k * (a * x * x + x);
// Check if reached destination
if (Mathf.Abs(x) > Mathf.Abs(destination))
{
eye.GetComponent<Animator>().SetTrigger("Destroy");
continue;
}
// Apply movement if not in destruction animation
Vector2 newPos = new Vector2(startX + x, transform.position.y + y);
eye.transform.position = newPos;
}
}
}

View File

@ -58,4 +58,6 @@ public class ArcProjectile : TargetedProjectile
Destroy(gameObject);
}
}
public float Angle { get => _angle; set => _angle = value; }
}