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
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!1 &130732
|
--- !u!1 &130732
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Component:
|
m_Component:
|
||||||
- 4: {fileID: 418246}
|
- 4: {fileID: 418246}
|
||||||
- 212: {fileID: 21220066}
|
- 212: {fileID: 21220066}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Sprite_Walk
|
m_Name: Sprite_Walk
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!1 &154602
|
--- !u!1 &154602
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Component:
|
m_Component:
|
||||||
- 4: {fileID: 494126}
|
- 4: {fileID: 494126}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Astronaut
|
m_Name: Astronaut
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!1 &157058
|
--- !u!1 &157058
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Component:
|
m_Component:
|
||||||
- 4: {fileID: 406446}
|
- 4: {fileID: 406446}
|
||||||
- 212: {fileID: 21257324}
|
- 212: {fileID: 21257324}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Sprite_Dash
|
m_Name: Sprite_Dash
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!1 &170392
|
--- !u!1 &170392
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Component:
|
m_Component:
|
||||||
- 4: {fileID: 403646}
|
- 4: {fileID: 403646}
|
||||||
- 114: {fileID: 11494368}
|
- 114: {fileID: 11494368}
|
||||||
- 114: {fileID: 11434752}
|
- 114: {fileID: 11434752}
|
||||||
- 136: {fileID: 13683032}
|
- 136: {fileID: 13683032}
|
||||||
- 54: {fileID: 5462614}
|
- 54: {fileID: 5462614}
|
||||||
- 136: {fileID: 13672180}
|
- 136: {fileID: 13672180}
|
||||||
- 114: {fileID: 11491252}
|
- 114: {fileID: 11491252}
|
||||||
- 82: {fileID: 8247410}
|
- 82: {fileID: 8247410}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Character
|
m_Name: Character
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!4 &403646
|
--- !u!1 &183028
|
||||||
Transform:
|
GameObject:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_GameObject: {fileID: 170392}
|
serializedVersion: 4
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_Component:
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
- 4: {fileID: 497504}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
- 212: {fileID: 21293154}
|
||||||
m_Children:
|
m_Layer: 0
|
||||||
- {fileID: 418246}
|
m_Name: Sprite_Stun
|
||||||
- {fileID: 406446}
|
m_TagString: Untagged
|
||||||
m_Father: {fileID: 494126}
|
m_Icon: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_NavMeshLayer: 0
|
||||||
--- !u!4 &406446
|
m_StaticEditorFlags: 0
|
||||||
Transform:
|
m_IsActive: 0
|
||||||
m_ObjectHideFlags: 1
|
--- !u!4 &403646
|
||||||
m_PrefabParentObject: {fileID: 0}
|
Transform:
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_ObjectHideFlags: 1
|
||||||
m_GameObject: {fileID: 157058}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_LocalPosition: {x: -0.04, y: 0.63, z: 0}
|
m_GameObject: {fileID: 170392}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_Children: []
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_Father: {fileID: 403646}
|
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
||||||
m_RootOrder: 1
|
m_Children:
|
||||||
--- !u!4 &418246
|
- {fileID: 418246}
|
||||||
Transform:
|
- {fileID: 406446}
|
||||||
m_ObjectHideFlags: 1
|
- {fileID: 497504}
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_Father: {fileID: 494126}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_RootOrder: 0
|
||||||
m_GameObject: {fileID: 130732}
|
--- !u!4 &406446
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
Transform:
|
||||||
m_LocalPosition: {x: -0.18, y: 0.36, z: 0}
|
m_ObjectHideFlags: 1
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Children: []
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_Father: {fileID: 403646}
|
m_GameObject: {fileID: 157058}
|
||||||
m_RootOrder: 0
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
--- !u!4 &494126
|
m_LocalPosition: {x: -0.04, y: 0.63, z: 0}
|
||||||
Transform:
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ObjectHideFlags: 1
|
m_Children: []
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_Father: {fileID: 403646}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_RootOrder: 1
|
||||||
m_GameObject: {fileID: 154602}
|
--- !u!4 &418246
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
Transform:
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0.11}
|
m_ObjectHideFlags: 1
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Children:
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
- {fileID: 403646}
|
m_GameObject: {fileID: 130732}
|
||||||
m_Father: {fileID: 0}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_RootOrder: 0
|
m_LocalPosition: {x: -0.18, y: 0.36, z: 0}
|
||||||
--- !u!54 &5462614
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
Rigidbody:
|
m_Children: []
|
||||||
m_ObjectHideFlags: 1
|
m_Father: {fileID: 403646}
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_RootOrder: 0
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
--- !u!4 &494126
|
||||||
m_GameObject: {fileID: 170392}
|
Transform:
|
||||||
serializedVersion: 2
|
m_ObjectHideFlags: 1
|
||||||
m_Mass: 1
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Drag: 0
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_AngularDrag: 0.05
|
m_GameObject: {fileID: 154602}
|
||||||
m_UseGravity: 0
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_IsKinematic: 0
|
m_LocalPosition: {x: 0, y: 0, z: 0.11}
|
||||||
m_Interpolate: 0
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Constraints: 120
|
m_Children:
|
||||||
m_CollisionDetection: 0
|
- {fileID: 403646}
|
||||||
--- !u!82 &8247410
|
m_Father: {fileID: 0}
|
||||||
AudioSource:
|
m_RootOrder: 0
|
||||||
m_ObjectHideFlags: 1
|
--- !u!4 &497504
|
||||||
m_PrefabParentObject: {fileID: 0}
|
Transform:
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_ObjectHideFlags: 1
|
||||||
m_GameObject: {fileID: 170392}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Enabled: 1
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
serializedVersion: 4
|
m_GameObject: {fileID: 183028}
|
||||||
OutputAudioMixerGroup: {fileID: 0}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_audioClip: {fileID: 8300000, guid: baf0f2aab6ecd0643a71917b93e90983, type: 3}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_PlayOnAwake: 0
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Volume: 0.788
|
m_Children: []
|
||||||
m_Pitch: 1
|
m_Father: {fileID: 403646}
|
||||||
Loop: 0
|
m_RootOrder: 2
|
||||||
Mute: 0
|
--- !u!54 &5462614
|
||||||
Spatialize: 0
|
Rigidbody:
|
||||||
Priority: 128
|
m_ObjectHideFlags: 1
|
||||||
DopplerLevel: 1
|
m_PrefabParentObject: {fileID: 0}
|
||||||
MinDistance: 1
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
MaxDistance: 500
|
m_GameObject: {fileID: 170392}
|
||||||
Pan2D: 0
|
serializedVersion: 2
|
||||||
rolloffMode: 0
|
m_Mass: 1
|
||||||
BypassEffects: 1
|
m_Drag: 0
|
||||||
BypassListenerEffects: 1
|
m_AngularDrag: 0.05
|
||||||
BypassReverbZones: 1
|
m_UseGravity: 0
|
||||||
rolloffCustomCurve:
|
m_IsKinematic: 0
|
||||||
serializedVersion: 2
|
m_Interpolate: 0
|
||||||
m_Curve:
|
m_Constraints: 120
|
||||||
- time: 0
|
m_CollisionDetection: 0
|
||||||
value: 1
|
--- !u!82 &8247410
|
||||||
inSlope: 0
|
AudioSource:
|
||||||
outSlope: 0
|
m_ObjectHideFlags: 1
|
||||||
tangentMode: 0
|
m_PrefabParentObject: {fileID: 0}
|
||||||
- time: 1
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
value: 0
|
m_GameObject: {fileID: 170392}
|
||||||
inSlope: 0
|
m_Enabled: 1
|
||||||
outSlope: 0
|
serializedVersion: 4
|
||||||
tangentMode: 0
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
m_PreInfinity: 2
|
m_audioClip: {fileID: 8300000, guid: baf0f2aab6ecd0643a71917b93e90983, type: 3}
|
||||||
m_PostInfinity: 2
|
m_PlayOnAwake: 0
|
||||||
m_RotationOrder: 4
|
m_Volume: 0.788
|
||||||
panLevelCustomCurve:
|
m_Pitch: 1
|
||||||
serializedVersion: 2
|
Loop: 0
|
||||||
m_Curve:
|
Mute: 0
|
||||||
- time: 0
|
Spatialize: 0
|
||||||
value: 0
|
Priority: 128
|
||||||
inSlope: 0
|
DopplerLevel: 1
|
||||||
outSlope: 0
|
MinDistance: 1
|
||||||
tangentMode: 0
|
MaxDistance: 500
|
||||||
m_PreInfinity: 2
|
Pan2D: 0
|
||||||
m_PostInfinity: 2
|
rolloffMode: 0
|
||||||
m_RotationOrder: 0
|
BypassEffects: 1
|
||||||
spreadCustomCurve:
|
BypassListenerEffects: 1
|
||||||
serializedVersion: 2
|
BypassReverbZones: 1
|
||||||
m_Curve:
|
rolloffCustomCurve:
|
||||||
- time: 0
|
serializedVersion: 2
|
||||||
value: 0
|
m_Curve:
|
||||||
inSlope: 0
|
- time: 0
|
||||||
outSlope: 0
|
value: 1
|
||||||
tangentMode: 0
|
inSlope: 0
|
||||||
m_PreInfinity: 2
|
outSlope: 0
|
||||||
m_PostInfinity: 2
|
tangentMode: 0
|
||||||
m_RotationOrder: 4
|
- time: 1
|
||||||
reverbZoneMixCustomCurve:
|
value: 0
|
||||||
serializedVersion: 2
|
inSlope: 0
|
||||||
m_Curve:
|
outSlope: 0
|
||||||
- time: 0
|
tangentMode: 0
|
||||||
value: 1
|
m_PreInfinity: 2
|
||||||
inSlope: 0
|
m_PostInfinity: 2
|
||||||
outSlope: 0
|
m_RotationOrder: 4
|
||||||
tangentMode: 0
|
panLevelCustomCurve:
|
||||||
m_PreInfinity: 2
|
serializedVersion: 2
|
||||||
m_PostInfinity: 2
|
m_Curve:
|
||||||
m_RotationOrder: 0
|
- time: 0
|
||||||
--- !u!114 &11434752
|
value: 0
|
||||||
MonoBehaviour:
|
inSlope: 0
|
||||||
m_ObjectHideFlags: 1
|
outSlope: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
tangentMode: 0
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PreInfinity: 2
|
||||||
m_GameObject: {fileID: 170392}
|
m_PostInfinity: 2
|
||||||
m_Enabled: 1
|
m_RotationOrder: 0
|
||||||
m_EditorHideFlags: 0
|
spreadCustomCurve:
|
||||||
m_Script: {fileID: 11500000, guid: ab270b0cb2475114ab8eb45661af0df1, type: 3}
|
serializedVersion: 2
|
||||||
m_Name:
|
m_Curve:
|
||||||
m_EditorClassIdentifier:
|
- time: 0
|
||||||
PlayerNumber: 0
|
value: 0
|
||||||
--- !u!114 &11491252
|
inSlope: 0
|
||||||
MonoBehaviour:
|
outSlope: 0
|
||||||
m_ObjectHideFlags: 1
|
tangentMode: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PreInfinity: 2
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PostInfinity: 2
|
||||||
m_GameObject: {fileID: 170392}
|
m_RotationOrder: 4
|
||||||
m_Enabled: 1
|
reverbZoneMixCustomCurve:
|
||||||
m_EditorHideFlags: 0
|
serializedVersion: 2
|
||||||
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
m_Curve:
|
||||||
m_Name:
|
- time: 0
|
||||||
m_EditorClassIdentifier:
|
value: 1
|
||||||
aspi: {fileID: 0}
|
inSlope: 0
|
||||||
WalkAnimSpeed: 4
|
outSlope: 0
|
||||||
WalkAnimAngle: 15
|
tangentMode: 0
|
||||||
EjectSpinSpeed: 80
|
m_PreInfinity: 2
|
||||||
DashImpactSound: {fileID: 191714, guid: df0221176ed8d3c4a91e31e791e5c0cc, type: 2}
|
m_PostInfinity: 2
|
||||||
DashParticleSystem: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
m_RotationOrder: 0
|
||||||
DustParticlesEmitter: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
--- !u!114 &11434752
|
||||||
--- !u!114 &11494368
|
MonoBehaviour:
|
||||||
MonoBehaviour:
|
m_ObjectHideFlags: 1
|
||||||
m_ObjectHideFlags: 1
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_GameObject: {fileID: 170392}
|
||||||
m_GameObject: {fileID: 170392}
|
m_Enabled: 1
|
||||||
m_Enabled: 1
|
m_EditorHideFlags: 0
|
||||||
m_EditorHideFlags: 0
|
m_Script: {fileID: 11500000, guid: ab270b0cb2475114ab8eb45661af0df1, type: 3}
|
||||||
m_Script: {fileID: 11500000, guid: 8c32c40e0b8e5eb47bb7a91068af09ca, type: 3}
|
m_Name:
|
||||||
m_Name:
|
m_EditorClassIdentifier:
|
||||||
m_EditorClassIdentifier:
|
PlayerNumber: 1
|
||||||
Rotator: {fileID: 154602}
|
--- !u!114 &11491252
|
||||||
SpriteWalk: {fileID: 21220066}
|
MonoBehaviour:
|
||||||
SpriteDash: {fileID: 157058}
|
m_ObjectHideFlags: 1
|
||||||
Width: 0.4
|
m_PrefabParentObject: {fileID: 0}
|
||||||
DashTime: 0.4
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
StepTime: 5
|
m_GameObject: {fileID: 170392}
|
||||||
JumpSpeed: 5
|
m_Enabled: 1
|
||||||
Gravity: 15
|
m_EditorHideFlags: 0
|
||||||
Speed: 5
|
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
||||||
EjectSpeed: 10
|
m_Name:
|
||||||
planet: {fileID: 0}
|
m_EditorClassIdentifier:
|
||||||
--- !u!136 &13672180
|
aspi: {fileID: 0}
|
||||||
CapsuleCollider:
|
WalkAnimSpeed: 4
|
||||||
m_ObjectHideFlags: 1
|
WalkAnimAngle: 15
|
||||||
m_PrefabParentObject: {fileID: 0}
|
EjectSpinSpeed: 80
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
DashImpactSound: {fileID: 191714, guid: df0221176ed8d3c4a91e31e791e5c0cc, type: 2}
|
||||||
m_GameObject: {fileID: 170392}
|
DashParticleSystem: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||||
m_Material: {fileID: 0}
|
DustParticlesEmitter: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2}
|
||||||
m_IsTrigger: 0
|
--- !u!114 &11494368
|
||||||
m_Enabled: 1
|
MonoBehaviour:
|
||||||
m_Radius: 0.77
|
m_ObjectHideFlags: 1
|
||||||
m_Height: 3.37
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Direction: 1
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_Center: {x: -0.03, y: 0.35, z: 0}
|
m_GameObject: {fileID: 170392}
|
||||||
--- !u!136 &13683032
|
m_Enabled: 1
|
||||||
CapsuleCollider:
|
m_EditorHideFlags: 0
|
||||||
m_ObjectHideFlags: 1
|
m_Script: {fileID: 11500000, guid: 8c32c40e0b8e5eb47bb7a91068af09ca, type: 3}
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_Name:
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_EditorClassIdentifier:
|
||||||
m_GameObject: {fileID: 170392}
|
Rotator: {fileID: 154602}
|
||||||
m_Material: {fileID: 0}
|
SpriteWalk: {fileID: 21220066}
|
||||||
m_IsTrigger: 0
|
SpriteDash: {fileID: 157058}
|
||||||
m_Enabled: 1
|
SpriteStun: {fileID: 183028}
|
||||||
m_Radius: 0.76
|
Width: 0.4
|
||||||
m_Height: 1.59
|
Height: 0.3
|
||||||
m_Direction: 1
|
DashTime: 0.4
|
||||||
m_Center: {x: -0.03, y: 1.31, z: 0}
|
StepTime: 5
|
||||||
--- !u!212 &21220066
|
JumpSpeed: 5
|
||||||
SpriteRenderer:
|
Gravity: 15
|
||||||
m_ObjectHideFlags: 1
|
Speed: 5
|
||||||
m_PrefabParentObject: {fileID: 0}
|
EjectSpeed: 10
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
planet: {fileID: 0}
|
||||||
m_GameObject: {fileID: 130732}
|
--- !u!136 &13672180
|
||||||
m_Enabled: 1
|
CapsuleCollider:
|
||||||
m_CastShadows: 0
|
m_ObjectHideFlags: 1
|
||||||
m_ReceiveShadows: 0
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_Materials:
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
m_GameObject: {fileID: 170392}
|
||||||
m_SubsetIndices:
|
m_Material: {fileID: 0}
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
m_IsTrigger: 0
|
||||||
m_UseLightProbes: 0
|
m_Enabled: 1
|
||||||
m_ReflectionProbeUsage: 0
|
m_Radius: 0.77
|
||||||
m_ProbeAnchor: {fileID: 0}
|
m_Height: 3.37
|
||||||
m_ScaleInLightmap: 1
|
m_Direction: 1
|
||||||
m_PreserveUVs: 0
|
m_Center: {x: -0.03, y: 0.35, z: 0}
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
--- !u!136 &13683032
|
||||||
m_ImportantGI: 0
|
CapsuleCollider:
|
||||||
m_MinimumChartSize: 4
|
m_ObjectHideFlags: 1
|
||||||
m_AutoUVMaxDistance: 0.5
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_AutoUVMaxAngle: 89
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_GameObject: {fileID: 170392}
|
||||||
m_SortingLayerID: 0
|
m_Material: {fileID: 0}
|
||||||
m_SortingOrder: 15
|
m_IsTrigger: 0
|
||||||
m_Sprite: {fileID: 21300000, guid: 028cce0260747214d81db557ec6f37c4, type: 3}
|
m_Enabled: 1
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Radius: 0.76
|
||||||
m_FlipX: 0
|
m_Height: 1.59
|
||||||
m_FlipY: 0
|
m_Direction: 1
|
||||||
--- !u!212 &21257324
|
m_Center: {x: -0.03, y: 1.31, z: 0}
|
||||||
SpriteRenderer:
|
--- !u!212 &21220066
|
||||||
m_ObjectHideFlags: 1
|
SpriteRenderer:
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_ObjectHideFlags: 1
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_GameObject: {fileID: 157058}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_Enabled: 1
|
m_GameObject: {fileID: 130732}
|
||||||
m_CastShadows: 0
|
m_Enabled: 1
|
||||||
m_ReceiveShadows: 0
|
m_CastShadows: 0
|
||||||
m_Materials:
|
m_ReceiveShadows: 0
|
||||||
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
m_Materials:
|
||||||
m_SubsetIndices:
|
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
m_SubsetIndices:
|
||||||
m_UseLightProbes: 0
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
m_ReflectionProbeUsage: 0
|
m_UseLightProbes: 0
|
||||||
m_ProbeAnchor: {fileID: 0}
|
m_ReflectionProbeUsage: 0
|
||||||
m_ScaleInLightmap: 1
|
m_ProbeAnchor: {fileID: 0}
|
||||||
m_PreserveUVs: 0
|
m_ScaleInLightmap: 1
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
m_PreserveUVs: 0
|
||||||
m_ImportantGI: 0
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
m_MinimumChartSize: 4
|
m_ImportantGI: 0
|
||||||
m_AutoUVMaxDistance: 0.5
|
m_MinimumChartSize: 4
|
||||||
m_AutoUVMaxAngle: 89
|
m_AutoUVMaxDistance: 0.5
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_AutoUVMaxAngle: 89
|
||||||
m_SortingLayerID: 0
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingOrder: 15
|
m_SortingLayerID: 0
|
||||||
m_Sprite: {fileID: 21300000, guid: 877352de2811c3e46b8b58e2475e07b3, type: 3}
|
m_SortingOrder: 15
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Sprite: {fileID: 21300000, guid: 028cce0260747214d81db557ec6f37c4, type: 3}
|
||||||
m_FlipX: 0
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipY: 0
|
m_FlipX: 0
|
||||||
--- !u!1001 &100100000
|
m_FlipY: 0
|
||||||
Prefab:
|
--- !u!212 &21257324
|
||||||
m_ObjectHideFlags: 1
|
SpriteRenderer:
|
||||||
serializedVersion: 2
|
m_ObjectHideFlags: 1
|
||||||
m_Modification:
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_TransformParent: {fileID: 0}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_Modifications: []
|
m_GameObject: {fileID: 157058}
|
||||||
m_RemovedComponents: []
|
m_Enabled: 1
|
||||||
m_ParentPrefab: {fileID: 0}
|
m_CastShadows: 0
|
||||||
m_RootGameObject: {fileID: 154602}
|
m_ReceiveShadows: 0
|
||||||
m_IsPrefabParent: 1
|
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
|
minMaxState: 0
|
||||||
speed: 1
|
speed: 1
|
||||||
randomSeed: 0
|
randomSeed: 0
|
||||||
looping: 1
|
looping: 0
|
||||||
prewarm: 0
|
prewarm: 0
|
||||||
playOnAwake: 1
|
playOnAwake: 1
|
||||||
moveWithTransform: 1
|
moveWithTransform: 1
|
||||||
|
|||||||
@ -12,9 +12,11 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
public GameObject Rotator;
|
public GameObject Rotator;
|
||||||
public SpriteRenderer SpriteWalk;
|
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
|
public float DashTime = 0.4f; //Temps de l'animation et rate limiting
|
||||||
private float lastDashTime = 0f;
|
private float lastDashTime = 0f;
|
||||||
public float StepTime;
|
public float StepTime;
|
||||||
@ -43,10 +45,9 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
if (oldState == AstronautState.Dashing)
|
if (oldState == AstronautState.Dashing)
|
||||||
{
|
{
|
||||||
_astronautAnimator.Land();
|
_astronautAnimator.Idle();
|
||||||
}
|
}
|
||||||
|
else if (State == AstronautState.Walking)
|
||||||
if (State == AstronautState.Walking)
|
|
||||||
{
|
{
|
||||||
_astronautAnimator.Walk(walkRight);
|
_astronautAnimator.Walk(walkRight);
|
||||||
}
|
}
|
||||||
@ -55,6 +56,10 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
private float theta = 0;
|
private float theta = 0;
|
||||||
private float height = 0;
|
private float height = 0;
|
||||||
|
public float Height
|
||||||
|
{
|
||||||
|
get { return height; }
|
||||||
|
}
|
||||||
private float vSpeed = 0;
|
private float vSpeed = 0;
|
||||||
private bool grounded = false;
|
private bool grounded = false;
|
||||||
private bool walkRight = false;
|
private bool walkRight = false;
|
||||||
@ -94,7 +99,7 @@ public class Astronaut : MonoBehaviour {
|
|||||||
private void UpdatePosition()
|
private void UpdatePosition()
|
||||||
{
|
{
|
||||||
//float heightAtPos = planet.GetPlanetRadius(theta);
|
//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);
|
Rotator.transform.localRotation = Quaternion.Euler(0, 0, theta - 108);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +110,7 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
private float GetGroundRadius(float theta)
|
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 radius1 = planet.GetPlanetRadius(Repeat(theta + displacement, 360));
|
||||||
float radius2 = planet.GetPlanetRadius(Repeat(theta - displacement, 360));
|
float radius2 = planet.GetPlanetRadius(Repeat(theta - displacement, 360));
|
||||||
//float x1, y1, x2, y2;
|
//float x1, y1, x2, y2;
|
||||||
@ -156,6 +161,9 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
public void Move(float x, float y)
|
public void Move(float x, float y)
|
||||||
{
|
{
|
||||||
|
if (State >= AstronautState.Dashing )
|
||||||
|
return;
|
||||||
|
|
||||||
float playerX, playerY;
|
float playerX, playerY;
|
||||||
PlanetUtilities.Spheric2Cartesian(theta - 108, height, out playerX, out playerY);
|
PlanetUtilities.Spheric2Cartesian(theta - 108, height, out playerX, out playerY);
|
||||||
|
|
||||||
@ -166,9 +174,6 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
float move = proj;
|
float move = proj;
|
||||||
|
|
||||||
if (State >= AstronautState.Dashing )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (State < AstronautState.Jumping)
|
if (State < AstronautState.Jumping)
|
||||||
{
|
{
|
||||||
if (Mathf.Approximately(move, 0))
|
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;
|
//Debug.Log("Blocked by wall");
|
||||||
|
return; // Blocked by wall
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
if (State == AstronautState.Dashing && grounded)
|
|
||||||
{
|
theta = newTheta;
|
||||||
//TODO arreter mouvement lateral
|
|
||||||
State=AstronautState.Idle;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Jump()
|
public void Jump()
|
||||||
@ -259,13 +256,32 @@ public class Astronaut : MonoBehaviour {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stun()
|
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()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString()))
|
if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString()))
|
||||||
{
|
{
|
||||||
|
Stun();
|
||||||
Debug.Log("Clicked the button with an image");
|
Debug.Log("Clicked the button with an image");
|
||||||
//_astronautAnimator.Walk();
|
//_astronautAnimator.Walk();
|
||||||
//Eject();
|
//Eject();
|
||||||
|
|||||||
@ -27,14 +27,24 @@ public class AstronautAnimator : MonoBehaviour {
|
|||||||
{
|
{
|
||||||
aspi.SpriteWalk.gameObject.SetActive(true);
|
aspi.SpriteWalk.gameObject.SetActive(true);
|
||||||
aspi.SpriteDash.gameObject.SetActive(false);
|
aspi.SpriteDash.gameObject.SetActive(false);
|
||||||
|
aspi.SpriteStun.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dash()
|
public void Dash()
|
||||||
{
|
{
|
||||||
aspi.SpriteWalk.gameObject.SetActive(false);
|
aspi.SpriteWalk.gameObject.SetActive(false);
|
||||||
aspi.SpriteDash.gameObject.SetActive(true);
|
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()
|
public void Land()
|
||||||
{
|
{
|
||||||
//from dash state
|
//from dash state
|
||||||
@ -42,14 +52,13 @@ public class AstronautAnimator : MonoBehaviour {
|
|||||||
runninParticleEmitter.transform.Rotate(0,180f,0.0f);
|
runninParticleEmitter.transform.Rotate(0,180f,0.0f);
|
||||||
|
|
||||||
Destroy(runninParticleEmitter, runninParticleEmitter.GetComponent<ParticleSystem>().duration);
|
Destroy(runninParticleEmitter, runninParticleEmitter.GetComponent<ParticleSystem>().duration);
|
||||||
|
Idle();
|
||||||
|
|
||||||
var impactAudio = DashImpactSound.GetComponent<AudioSource>();
|
var impactAudio = DashImpactSound.GetComponent<AudioSource>();
|
||||||
impactAudio.bypassListenerEffects = true;
|
impactAudio.bypassListenerEffects = true;
|
||||||
AudioSource.PlayClipAtPoint(impactAudio.clip, transform.position, impactAudio.volume);
|
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
|
var audio = aspi.GetComponent<AudioSource>(); //eject sound
|
||||||
audio.bypassListenerEffects = true;
|
audio.bypassListenerEffects = true;
|
||||||
AudioSource.PlayClipAtPoint(audio.clip, transform.position, audio.volume);
|
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()
|
IEnumerator Spin()
|
||||||
|
|||||||
@ -6,75 +6,69 @@ public class Earthquake : MonoBehaviour {
|
|||||||
|
|
||||||
public float CriticalMin;
|
public float CriticalMin;
|
||||||
public float CriticalMax;
|
public float CriticalMax;
|
||||||
//public float testValue;
|
public float ExplosionTime;
|
||||||
|
public GameObject ExplosionParticle;
|
||||||
//public float gaugeLevel;
|
private const float WaveSpeed = 1f;
|
||||||
//public int gaugeMax=100;
|
private const float WaveOffset = 1.3f;
|
||||||
|
|
||||||
private SpriteRenderer core;
|
private SpriteRenderer core;
|
||||||
PlanetManager pmgr;
|
PlanetManager pmgr;
|
||||||
|
|
||||||
|
bool isExploding;
|
||||||
|
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
pmgr = FindObjectOfType<PlanetManager>();
|
isExploding = false;
|
||||||
//gaugeLevel = 0;
|
pmgr = FindObjectOfType<PlanetManager>();
|
||||||
core = this.GetComponent<SpriteRenderer>();
|
core = this.GetComponent<SpriteRenderer>();
|
||||||
//InvokeRepeating("FillGauge", 1, 1F);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
public void Update () {
|
public void Update () {
|
||||||
|
|
||||||
|
if(!isExploding) return;
|
||||||
|
|
||||||
float disbalance = pmgr.GetDisbalance();
|
float disbalance = pmgr.GetDisbalance();
|
||||||
float val = Mathf.Clamp((disbalance-CriticalMin) / (CriticalMax-CriticalMin),0,1);
|
float val = Mathf.Clamp((disbalance-CriticalMin) / (CriticalMax-CriticalMin),0,1);
|
||||||
|
|
||||||
float val2 = Mathf.Clamp((val - 0.6f) / 0.4f, 0, 1);
|
float val2 = Mathf.Clamp((val - 0.6f) / 0.4f, 0, 1);
|
||||||
pmgr.setColor(val2);
|
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);
|
v.sprite.transform.localScale = new Vector3(v.offset, v.offset, 1);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// call fill gauge after every hit.
|
// call fill gauge after every hit.
|
||||||
var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
//var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
||||||
earthQuakeGauge.FillGauge();
|
//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>
|
/// <summary>
|
||||||
/// On a earthquake, everything expands by a step
|
/// On a earthquake, everything expands by a step
|
||||||
/// </summary>
|
/// </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
|
propertyPath: playOnAwake
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 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_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -517,6 +529,14 @@ Prefab:
|
|||||||
propertyPath: m_Color.b
|
propertyPath: m_Color.b
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 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_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -579,6 +599,14 @@ Prefab:
|
|||||||
propertyPath: CriticalMax
|
propertyPath: CriticalMax
|
||||||
value: 0.75
|
value: 0.75
|
||||||
objectReference: {fileID: 0}
|
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_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 198e988adacced646a19f757f6237ae1, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 198e988adacced646a19f757f6237ae1, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -731,6 +759,18 @@ Prefab:
|
|||||||
propertyPath: m_Color.b
|
propertyPath: m_Color.b
|
||||||
value: 0.09803922
|
value: 0.09803922
|
||||||
objectReference: {fileID: 0}
|
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_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -829,6 +869,14 @@ Prefab:
|
|||||||
propertyPath: m_Color.b
|
propertyPath: m_Color.b
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
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_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user