mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
Merge branch 'master' of github.com:ETSConjure/PixelSphinx
This commit is contained in:
commit
038748f96d
BIN
Assets/Art/T_Char_Stunned_03.png
Normal file
BIN
Assets/Art/T_Char_Stunned_03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
57
Assets/Art/T_Char_Stunned_03.png.meta
Normal file
57
Assets/Art/T_Char_Stunned_03.png.meta
Normal file
@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f232242ccad7e3842bad3905b644b140
|
||||
timeCreated: 1460228310
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,360 +1,421 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &130732
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 418246}
|
||||
- 212: {fileID: 21220066}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite_Walk
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &154602
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 494126}
|
||||
m_Layer: 0
|
||||
m_Name: Astronaut
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &157058
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 406446}
|
||||
- 212: {fileID: 21257324}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite_Dash
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &170392
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 403646}
|
||||
- 114: {fileID: 11494368}
|
||||
- 114: {fileID: 11434752}
|
||||
- 136: {fileID: 13683032}
|
||||
- 54: {fileID: 5462614}
|
||||
- 136: {fileID: 13672180}
|
||||
- 114: {fileID: 11491252}
|
||||
- 82: {fileID: 8247410}
|
||||
m_Layer: 0
|
||||
m_Name: Character
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &403646
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
||||
m_Children:
|
||||
- {fileID: 418246}
|
||||
- {fileID: 406446}
|
||||
m_Father: {fileID: 494126}
|
||||
m_RootOrder: 0
|
||||
--- !u!4 &406446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 157058}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.04, y: 0.63, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 403646}
|
||||
m_RootOrder: 1
|
||||
--- !u!4 &418246
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 130732}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.18, y: 0.36, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 403646}
|
||||
m_RootOrder: 0
|
||||
--- !u!4 &494126
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154602}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.11}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 403646}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
--- !u!54 &5462614
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 120
|
||||
m_CollisionDetection: 0
|
||||
--- !u!82 &8247410
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: baf0f2aab6ecd0643a71917b93e90983, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.788
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 1
|
||||
BypassListenerEffects: 1
|
||||
BypassReverbZones: 1
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
--- !u!114 &11434752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ab270b0cb2475114ab8eb45661af0df1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PlayerNumber: 0
|
||||
--- !u!114 &11491252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
aspi: {fileID: 0}
|
||||
WalkAnimSpeed: 4
|
||||
WalkAnimAngle: 15
|
||||
EjectSpinSpeed: 80
|
||||
DashImpactSound: {fileID: 191714, guid: df0221176ed8d3c4a91e31e791e5c0cc, type: 2}
|
||||
DashParticleSystem: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||
DustParticlesEmitter: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||
--- !u!114 &11494368
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8c32c40e0b8e5eb47bb7a91068af09ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Rotator: {fileID: 154602}
|
||||
SpriteWalk: {fileID: 21220066}
|
||||
SpriteDash: {fileID: 157058}
|
||||
Width: 0.4
|
||||
DashTime: 0.4
|
||||
StepTime: 5
|
||||
JumpSpeed: 5
|
||||
Gravity: 15
|
||||
Speed: 5
|
||||
EjectSpeed: 10
|
||||
planet: {fileID: 0}
|
||||
--- !u!136 &13672180
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.77
|
||||
m_Height: 3.37
|
||||
m_Direction: 1
|
||||
m_Center: {x: -0.03, y: 0.35, z: 0}
|
||||
--- !u!136 &13683032
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.76
|
||||
m_Height: 1.59
|
||||
m_Direction: 1
|
||||
m_Center: {x: -0.03, y: 1.31, z: 0}
|
||||
--- !u!212 &21220066
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 130732}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 15
|
||||
m_Sprite: {fileID: 21300000, guid: 028cce0260747214d81db557ec6f37c4, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
--- !u!212 &21257324
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 157058}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 15
|
||||
m_Sprite: {fileID: 21300000, guid: 877352de2811c3e46b8b58e2475e07b3, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 154602}
|
||||
m_IsPrefabParent: 1
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &130732
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 418246}
|
||||
- 212: {fileID: 21220066}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite_Walk
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &154602
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 494126}
|
||||
m_Layer: 0
|
||||
m_Name: Astronaut
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &157058
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 406446}
|
||||
- 212: {fileID: 21257324}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite_Dash
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!1 &170392
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 403646}
|
||||
- 114: {fileID: 11494368}
|
||||
- 114: {fileID: 11434752}
|
||||
- 136: {fileID: 13683032}
|
||||
- 54: {fileID: 5462614}
|
||||
- 136: {fileID: 13672180}
|
||||
- 114: {fileID: 11491252}
|
||||
- 82: {fileID: 8247410}
|
||||
m_Layer: 0
|
||||
m_Name: Character
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &183028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 497504}
|
||||
- 212: {fileID: 21293154}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite_Stun
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &403646
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
||||
m_Children:
|
||||
- {fileID: 418246}
|
||||
- {fileID: 406446}
|
||||
- {fileID: 497504}
|
||||
m_Father: {fileID: 494126}
|
||||
m_RootOrder: 0
|
||||
--- !u!4 &406446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 157058}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.04, y: 0.63, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 403646}
|
||||
m_RootOrder: 1
|
||||
--- !u!4 &418246
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 130732}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.18, y: 0.36, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 403646}
|
||||
m_RootOrder: 0
|
||||
--- !u!4 &494126
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154602}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.11}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 403646}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
--- !u!4 &497504
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 183028}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 403646}
|
||||
m_RootOrder: 2
|
||||
--- !u!54 &5462614
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 120
|
||||
m_CollisionDetection: 0
|
||||
--- !u!82 &8247410
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: baf0f2aab6ecd0643a71917b93e90983, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.788
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 1
|
||||
BypassListenerEffects: 1
|
||||
BypassReverbZones: 1
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
--- !u!114 &11434752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ab270b0cb2475114ab8eb45661af0df1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PlayerNumber: 1
|
||||
--- !u!114 &11491252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
aspi: {fileID: 0}
|
||||
WalkAnimSpeed: 4
|
||||
WalkAnimAngle: 15
|
||||
EjectSpinSpeed: 80
|
||||
DashImpactSound: {fileID: 191714, guid: df0221176ed8d3c4a91e31e791e5c0cc, type: 2}
|
||||
DashParticleSystem: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||
DustParticlesEmitter: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||
--- !u!114 &11494368
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8c32c40e0b8e5eb47bb7a91068af09ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Rotator: {fileID: 154602}
|
||||
SpriteWalk: {fileID: 21220066}
|
||||
SpriteDash: {fileID: 157058}
|
||||
SpriteStun: {fileID: 183028}
|
||||
Width: 0.4
|
||||
Height: 0.3
|
||||
DashTime: 0.4
|
||||
StepTime: 5
|
||||
JumpSpeed: 5
|
||||
Gravity: 15
|
||||
Speed: 5
|
||||
EjectSpeed: 10
|
||||
planet: {fileID: 0}
|
||||
--- !u!136 &13672180
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.77
|
||||
m_Height: 3.37
|
||||
m_Direction: 1
|
||||
m_Center: {x: -0.03, y: 0.35, z: 0}
|
||||
--- !u!136 &13683032
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 170392}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.76
|
||||
m_Height: 1.59
|
||||
m_Direction: 1
|
||||
m_Center: {x: -0.03, y: 1.31, z: 0}
|
||||
--- !u!212 &21220066
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 130732}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 15
|
||||
m_Sprite: {fileID: 21300000, guid: 028cce0260747214d81db557ec6f37c4, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
--- !u!212 &21257324
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 157058}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 15
|
||||
m_Sprite: {fileID: 21300000, guid: 877352de2811c3e46b8b58e2475e07b3, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
--- !u!212 &21293154
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 183028}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 15
|
||||
m_Sprite: {fileID: 21300000, guid: f232242ccad7e3842bad3905b644b140, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 154602}
|
||||
m_IsPrefabParent: 1
|
||||
|
||||
@ -74,7 +74,7 @@ ParticleSystem:
|
||||
minMaxState: 0
|
||||
speed: 1
|
||||
randomSeed: 0
|
||||
looping: 1
|
||||
looping: 0
|
||||
prewarm: 0
|
||||
playOnAwake: 1
|
||||
moveWithTransform: 1
|
||||
|
||||
@ -12,9 +12,11 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
public GameObject Rotator;
|
||||
public SpriteRenderer SpriteWalk;
|
||||
public GameObject SpriteDash;
|
||||
public GameObject SpriteDash;
|
||||
public GameObject SpriteStun;
|
||||
|
||||
public float Width;
|
||||
public float SpriteWidth;
|
||||
public float SpriteHeight;
|
||||
public float DashTime = 0.4f; //Temps de l'animation et rate limiting
|
||||
private float lastDashTime = 0f;
|
||||
public float StepTime;
|
||||
@ -43,10 +45,9 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
if (oldState == AstronautState.Dashing)
|
||||
{
|
||||
_astronautAnimator.Land();
|
||||
_astronautAnimator.Idle();
|
||||
}
|
||||
|
||||
if (State == AstronautState.Walking)
|
||||
else if (State == AstronautState.Walking)
|
||||
{
|
||||
_astronautAnimator.Walk(walkRight);
|
||||
}
|
||||
@ -55,6 +56,10 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
private float theta = 0;
|
||||
private float height = 0;
|
||||
public float Height
|
||||
{
|
||||
get { return height; }
|
||||
}
|
||||
private float vSpeed = 0;
|
||||
private bool grounded = false;
|
||||
private bool walkRight = false;
|
||||
@ -94,7 +99,7 @@ public class Astronaut : MonoBehaviour {
|
||||
private void UpdatePosition()
|
||||
{
|
||||
//float heightAtPos = planet.GetPlanetRadius(theta);
|
||||
transform.localPosition = new Vector3(0, height, 0);
|
||||
transform.localPosition = new Vector3(0, height + SpriteHeight / 2, 0);
|
||||
Rotator.transform.localRotation = Quaternion.Euler(0, 0, theta - 108);
|
||||
}
|
||||
|
||||
@ -105,7 +110,7 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
private float GetGroundRadius(float theta)
|
||||
{
|
||||
float displacement = PlanetUtilities.GetDisplacementAngle(Width / 2, height);
|
||||
float displacement = PlanetUtilities.GetDisplacementAngle(SpriteWidth / 2, height);
|
||||
float radius1 = planet.GetPlanetRadius(Repeat(theta + displacement, 360));
|
||||
float radius2 = planet.GetPlanetRadius(Repeat(theta - displacement, 360));
|
||||
//float x1, y1, x2, y2;
|
||||
@ -156,6 +161,9 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
public void Move(float x, float y)
|
||||
{
|
||||
if (State >= AstronautState.Dashing )
|
||||
return;
|
||||
|
||||
float playerX, playerY;
|
||||
PlanetUtilities.Spheric2Cartesian(theta - 108, height, out playerX, out playerY);
|
||||
|
||||
@ -166,9 +174,6 @@ public class Astronaut : MonoBehaviour {
|
||||
|
||||
float move = proj;
|
||||
|
||||
if (State >= AstronautState.Dashing )
|
||||
return;
|
||||
|
||||
if (State < AstronautState.Jumping)
|
||||
{
|
||||
if (Mathf.Approximately(move, 0))
|
||||
@ -183,28 +188,20 @@ public class Astronaut : MonoBehaviour {
|
||||
}
|
||||
}
|
||||
|
||||
if (State < AstronautState.Dashing)
|
||||
if (-0.2 < move && move < 0.2) return;
|
||||
|
||||
float movement = PlanetUtilities.GetDisplacementAngle(Speed * -move, height) * Time.deltaTime;
|
||||
|
||||
float newTheta = Repeat(theta + movement, 360);
|
||||
|
||||
float newHeight = GetGroundRadius(newTheta);
|
||||
if (newHeight > height)
|
||||
{
|
||||
if (-0.2 < move && move < 0.2) return;
|
||||
|
||||
float movement = PlanetUtilities.GetDisplacementAngle(Speed * -move, height) * Time.deltaTime;
|
||||
|
||||
float newTheta = Repeat(theta + movement, 360);
|
||||
|
||||
float newHeight = GetGroundRadius(newTheta);
|
||||
if (newHeight > height)
|
||||
{
|
||||
//Debug.Log("Blocked by wall");
|
||||
return; // Blocked by wall
|
||||
}
|
||||
|
||||
theta = newTheta;
|
||||
//Debug.Log("Blocked by wall");
|
||||
return; // Blocked by wall
|
||||
}
|
||||
if (State == AstronautState.Dashing && grounded)
|
||||
{
|
||||
//TODO arreter mouvement lateral
|
||||
State=AstronautState.Idle;
|
||||
}
|
||||
|
||||
theta = newTheta;
|
||||
}
|
||||
|
||||
public void Jump()
|
||||
@ -259,13 +256,32 @@ public class Astronaut : MonoBehaviour {
|
||||
/// </summary>
|
||||
public void Stun()
|
||||
{
|
||||
//TODO
|
||||
if (State < AstronautState.Ejecting)
|
||||
{
|
||||
State = AstronautState.Stun;
|
||||
StartCoroutine(StunTimeout());
|
||||
_astronautAnimator.Stun();
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator StunTimeout()
|
||||
{
|
||||
for (float i = 0f; i <0.6f; i += Time.deltaTime)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
if (State < AstronautState.Ejecting)
|
||||
{
|
||||
State = AstronautState.Idle;
|
||||
_astronautAnimator.Idle();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString()))
|
||||
{
|
||||
Stun();
|
||||
Debug.Log("Clicked the button with an image");
|
||||
//_astronautAnimator.Walk();
|
||||
//Eject();
|
||||
|
||||
@ -27,14 +27,24 @@ public class AstronautAnimator : MonoBehaviour {
|
||||
{
|
||||
aspi.SpriteWalk.gameObject.SetActive(true);
|
||||
aspi.SpriteDash.gameObject.SetActive(false);
|
||||
aspi.SpriteStun.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Dash()
|
||||
{
|
||||
aspi.SpriteWalk.gameObject.SetActive(false);
|
||||
aspi.SpriteDash.gameObject.SetActive(true);
|
||||
aspi.SpriteStun.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Idle()
|
||||
{
|
||||
|
||||
aspi.SpriteWalk.gameObject.SetActive(true);
|
||||
aspi.SpriteDash.gameObject.SetActive(false);
|
||||
aspi.SpriteStun.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Land()
|
||||
{
|
||||
//from dash state
|
||||
@ -42,14 +52,13 @@ public class AstronautAnimator : MonoBehaviour {
|
||||
runninParticleEmitter.transform.Rotate(0,180f,0.0f);
|
||||
|
||||
Destroy(runninParticleEmitter, runninParticleEmitter.GetComponent<ParticleSystem>().duration);
|
||||
Idle();
|
||||
|
||||
var impactAudio = DashImpactSound.GetComponent<AudioSource>();
|
||||
impactAudio.bypassListenerEffects = true;
|
||||
AudioSource.PlayClipAtPoint(impactAudio.clip, transform.position, impactAudio.volume);
|
||||
|
||||
|
||||
aspi.SpriteWalk.gameObject.SetActive(true);
|
||||
aspi.SpriteDash.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +73,14 @@ public class AstronautAnimator : MonoBehaviour {
|
||||
var audio = aspi.GetComponent<AudioSource>(); //eject sound
|
||||
audio.bypassListenerEffects = true;
|
||||
AudioSource.PlayClipAtPoint(audio.clip, transform.position, audio.volume);
|
||||
Stun();
|
||||
}
|
||||
|
||||
public void Stun()
|
||||
{
|
||||
aspi.SpriteWalk.gameObject.SetActive(false);
|
||||
aspi.SpriteDash.gameObject.SetActive(false);
|
||||
aspi.SpriteStun.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
IEnumerator Spin()
|
||||
|
||||
@ -6,75 +6,69 @@ public class Earthquake : MonoBehaviour {
|
||||
|
||||
public float CriticalMin;
|
||||
public float CriticalMax;
|
||||
//public float testValue;
|
||||
|
||||
//public float gaugeLevel;
|
||||
//public int gaugeMax=100;
|
||||
public float ExplosionTime;
|
||||
public GameObject ExplosionParticle;
|
||||
private const float WaveSpeed = 1f;
|
||||
private const float WaveOffset = 1.3f;
|
||||
|
||||
private SpriteRenderer core;
|
||||
PlanetManager pmgr;
|
||||
PlanetManager pmgr;
|
||||
|
||||
bool isExploding;
|
||||
|
||||
|
||||
// Use this for initialization
|
||||
public void Start()
|
||||
{
|
||||
pmgr = FindObjectOfType<PlanetManager>();
|
||||
//gaugeLevel = 0;
|
||||
isExploding = false;
|
||||
pmgr = FindObjectOfType<PlanetManager>();
|
||||
core = this.GetComponent<SpriteRenderer>();
|
||||
//InvokeRepeating("FillGauge", 1, 1F);
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
public void Update () {
|
||||
|
||||
if(!isExploding) return;
|
||||
|
||||
float disbalance = pmgr.GetDisbalance();
|
||||
float val = Mathf.Clamp((disbalance-CriticalMin) / (CriticalMax-CriticalMin),0,1);
|
||||
|
||||
float val2 = Mathf.Clamp((val - 0.6f) / 0.4f, 0, 1);
|
||||
pmgr.setColor(val2);
|
||||
|
||||
core.color = new Color(1f, 1f - val, 1f - val);
|
||||
|
||||
core.color = new Color(1f, 1f - val, 1f - val);
|
||||
|
||||
if (val2 >= 1f)
|
||||
{
|
||||
EarthquakeBoom();
|
||||
}
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
if (GUI.Button(new Rect(100, 100, 50, 50), "BOOM"))
|
||||
{
|
||||
Debug.Log("Clicked the button with an image");
|
||||
EarthquakeBoom();
|
||||
}
|
||||
}
|
||||
|
||||
private void EarthquakeBoom()
|
||||
{
|
||||
isExploding = true;
|
||||
StartCoroutine(Explode());
|
||||
Instantiate(ExplosionParticle);
|
||||
}
|
||||
|
||||
IEnumerator Explode()
|
||||
{
|
||||
float realPosition;
|
||||
for (float i = 0; i < ExplosionTime; i += Time.deltaTime)
|
||||
{
|
||||
realPosition = WaveSpeed * i + WaveOffset;
|
||||
Debug.Log(realPosition);
|
||||
pmgr.EjectPlayers(realPosition);
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Actualiser l'affichage de la gauge
|
||||
/// </summary>
|
||||
public void UpdateFixed()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// à être Appelé à chaque fois qu'on enfonce un plateau, le gage se remplis plus vite. (et par le temps)
|
||||
/// </summary>
|
||||
public void FillGauge()
|
||||
{
|
||||
|
||||
/*if (gaugeLevel < gaugeMax)
|
||||
{
|
||||
gaugeLevel += 1;
|
||||
|
||||
//anim state [0-90] normale, rotation
|
||||
|
||||
//color hue de plus en plus vers le rouge
|
||||
|
||||
//[90-100]
|
||||
//anim avec les ripples
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var planet = FindObjectOfType<PlanetManager>();
|
||||
|
||||
planet.CallEarthQuake();
|
||||
|
||||
gaugeLevel = 0;
|
||||
|
||||
}
|
||||
print("gauge is at: " + gaugeLevel);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -172,15 +172,21 @@ public class PlanetManager : MonoBehaviour
|
||||
v.sprite.transform.localScale = new Vector3(v.offset, v.offset, 1);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// call fill gauge after every hit.
|
||||
var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
||||
earthQuakeGauge.FillGauge();
|
||||
//var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
||||
//earthQuakeGauge.FillGauge();
|
||||
}
|
||||
|
||||
public void EjectPlayers(float range)
|
||||
{
|
||||
Astronaut[] players = FindObjectsOfType<Astronaut>();
|
||||
foreach (Astronaut p in players)
|
||||
{
|
||||
if (p.State < Astronaut.AstronautState.Ejecting && p.Height <= range)
|
||||
p.Eject();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On a earthquake, everything expands by a step
|
||||
/// </summary>
|
||||
|
||||
39
Assets/Test/EarthquakeTest.cs
Normal file
39
Assets/Test/EarthquakeTest.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class EarthquakeTest : MonoBehaviour {
|
||||
|
||||
public GameObject particle;
|
||||
private GameObject obj;
|
||||
|
||||
public float Mod1, Mod2;
|
||||
|
||||
float timeSinceStart = 0;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
timeSinceStart += Time.deltaTime;
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
if(obj!=null)
|
||||
Destroy(obj);
|
||||
obj = (GameObject)Instantiate(particle);
|
||||
timeSinceStart = 0f;
|
||||
}
|
||||
|
||||
if( Input.GetKeyDown(KeyCode.C))
|
||||
{
|
||||
Destroy(obj);
|
||||
obj = null;
|
||||
}
|
||||
|
||||
Debug.DrawLine(Vector3.zero, new Vector3(Mod1 * timeSinceStart + Mod2, 0f, 0f));
|
||||
}
|
||||
}
|
||||
12
Assets/Test/EarthquakeTest.cs.meta
Normal file
12
Assets/Test/EarthquakeTest.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b478dc9d54d60fe4cb0b8a261ec5f65b
|
||||
timeCreated: 1460226796
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -169,6 +169,18 @@ Prefab:
|
||||
propertyPath: playOnAwake
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.g
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.b
|
||||
value: 0.96862745
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11434752, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: PlayerNumber
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -517,6 +529,14 @@ Prefab:
|
||||
propertyPath: m_Color.b
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.g
|
||||
value: 0.96862745
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.b
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -579,6 +599,14 @@ Prefab:
|
||||
propertyPath: CriticalMax
|
||||
value: 0.75
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11401034, guid: 198e988adacced646a19f757f6237ae1, type: 2}
|
||||
propertyPath: ExplosionParticle
|
||||
value:
|
||||
objectReference: {fileID: 120238, guid: 1a5b0b5645fa6104087fd9f96b6104b9, type: 2}
|
||||
- target: {fileID: 11401034, guid: 198e988adacced646a19f757f6237ae1, type: 2}
|
||||
propertyPath: ExplosionTime
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 198e988adacced646a19f757f6237ae1, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -731,6 +759,18 @@ Prefab:
|
||||
propertyPath: m_Color.b
|
||||
value: 0.09803922
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.r
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.g
|
||||
value: 0.72156864
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.b
|
||||
value: 0.09803922
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -829,6 +869,14 @@ Prefab:
|
||||
propertyPath: m_Color.b
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.r
|
||||
value: 0.07450981
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 21293154, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
propertyPath: m_Color.g
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user