Compare commits

...

2 Commits

Author SHA1 Message Date
haitem 4c9a5fc2e2 Merge branch 'master' of https://git.steelants.cz/GJP/GlobalGameJam-2021 2021-01-30 17:44:25 +01:00
haitem 883b1bfb9f add saw 2021-01-30 17:44:13 +01:00
8 changed files with 1017 additions and 24 deletions

View File

@ -23,7 +23,7 @@ ModelImporter:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
@ -84,7 +84,7 @@ ModelImporter:
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
hasExtraRoot: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1

561
Assets/Models/Saw.anim Normal file
View File

@ -0,0 +1,561 @@
%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: Saw
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.25
value: {x: 90, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.5
value: {x: 180, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.75
value: {x: 270, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
value: {x: 360, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Cylinder
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.25
value: {x: 90, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.5
value: {x: 180, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.75
value: {x: 270, y: 0, z: 0}
inSlope: {x: 360, y: 0, z: 0}
outSlope: {x: 360, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
value: {x: 360, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Cylinder.001
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
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: 1651653052
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
- serializedVersion: 2
path: 166846581
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
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:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 90
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 180
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 270
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 360
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 90
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 180
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 270
inSlope: 360
outSlope: 360
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 360
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Cylinder.001
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Cylinder.001
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Cylinder.001
classID: 4
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Cylinder
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Cylinder.001
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Cylinder.001
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Cylinder.001
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

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

298
Assets/Prefabs/Saw.prefab Normal file
View File

@ -0,0 +1,298 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!135 &1833346281
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8540487821801351054}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 3
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &8810309421118380755
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8540487821801351054}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 91a5e2ada06678741aadb6c71fc7532b, type: 3}
m_Name:
m_EditorClassIdentifier:
objectType: 3
instaKill: 0
damage: 25
damageRate: 0.5
--- !u!111 &8810309421118380752
Animation:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8540487821801351054}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: 3be0c85867733db4ba4c4495fc5dcc0d, type: 2}
m_Animations:
- {fileID: 7400000, guid: 3be0c85867733db4ba4c4495fc5dcc0d, type: 2}
m_WrapMode: 0
m_PlayAutomatically: 1
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!1 &8810309419999466073
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8810309419999466072}
m_Layer: 0
m_Name: Saw
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8810309419999466072
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8810309419999466073}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.64, y: 0, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_Children:
- {fileID: 9065245498062191924}
- {fileID: 8810309421689333096}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8810309421689333097
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8810309421689333096}
- component: {fileID: 8810309421689333098}
- component: {fileID: 8810309421689333099}
- component: {fileID: 1398709076}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8810309421689333096
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8810309421689333097}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.025, z: 0}
m_LocalScale: {x: 1.5, y: 0.05, z: 0.3}
m_Children: []
m_Father: {fileID: 8810309419999466072}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8810309421689333098
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8810309421689333097}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8810309421689333099
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8810309421689333097}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1398709076
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8810309421689333097}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.0000001, y: 1.0000001, z: 1}
m_Center: {x: 0.00000011920929, y: 0.000000059604645, z: 0}
--- !u!1001 &8810309421118380767
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8810309419999466072}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalScale.x
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalScale.y
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalScale.z
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -90
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2577548232221058511, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071067
objectReference: {fileID: 0}
- target: {fileID: -2577548232221058511, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -2577548232221058511, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2577548232221058511, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -2577548232221058511, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_Name
value: Saw
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
propertyPath: m_TagString
value: EnemyObjects
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46644e18916d65847abb4e90df7dba6f, type: 3}
--- !u!1 &8540487821801351054 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
m_PrefabInstance: {fileID: 8810309421118380767}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9065245498062191924 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 46644e18916d65847abb4e90df7dba6f,
type: 3}
m_PrefabInstance: {fileID: 8810309421118380767}
m_PrefabAsset: {fileID: 0}

View File

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

View File

@ -390,7 +390,7 @@ PrefabInstance:
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: activeAbility.Array.data[0]
value: 0
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
@ -523,3 +523,77 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0d7691d0b9091aa4dba16f262d8daf1b, type: 3}
--- !u!1001 &8810309420367969849
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalPosition.x
value: 2.64
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466072, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810309419999466073, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_Name
value: Saw
objectReference: {fileID: 0}
- target: {fileID: 8810309421118380752, guid: 75a5dff38607d264bbf318173d359a5e,
type: 3}
propertyPath: m_PlayAutomatically
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 75a5dff38607d264bbf318173d359a5e, type: 3}

View File

@ -4,7 +4,7 @@ using UnityEngine;
public class DamageObjectsManager : MonoBehaviour
{
public enum ObjectType { Object, HideSpikes, ShowSpikes };
public enum ObjectType { Object, HideSpikes, ShowSpikes, StaticSaw, RidingSaw };
public ObjectType objectType = ObjectType.Object;
private Animation animation;
private bool animate = false;
@ -13,6 +13,8 @@ public class DamageObjectsManager : MonoBehaviour
public float damage = 10f;
public float damageRate = 5f;
private float actualDamageRate = 0f;
private bool interact = false;
private PlayerManager playerManager;
void Start()
{
@ -22,6 +24,51 @@ public class DamageObjectsManager : MonoBehaviour
// Update is called once per frame
void Update()
{
if (interact)
{
if (objectType == ObjectType.HideSpikes)
{
if (!animate)
{
animation["Spikes"].speed = 1f;
animation["Spikes"].normalizedTime = 0f;
animation.Play("Spikes");
animate = true;
}
}
if (objectType == ObjectType.ShowSpikes)
{
if (actualDamageRate < Time.time)
{
actualDamageRate = Time.time + damageRate;
playerManager.damage(damage, instaKill);
}
}
if (objectType == ObjectType.StaticSaw)
{
Debug.Log(!animation.isPlaying);
if (!animation.isPlaying)
{
animation.Play("Saw");
}
if (actualDamageRate < Time.time)
{
actualDamageRate = Time.time + damageRate;
playerManager.damage(damage, instaKill);
}
}
if (objectType == ObjectType.RidingSaw)
{
if (actualDamageRate < Time.time)
{
actualDamageRate = Time.time + damageRate;
playerManager.damage(damage, instaKill);
}
}
}
}
public void damagePlayer(PlayerManager playerManager)
@ -35,28 +82,19 @@ public class DamageObjectsManager : MonoBehaviour
private void OnTriggerStay(Collider other)
{
if (objectType == ObjectType.HideSpikes)
if (other.gameObject.tag == "Player")
{
if (other.gameObject.tag == "Player" && !animate)
{
Debug.Log(other.tag);
animation["Spikes"].speed = 1f;
animation["Spikes"].normalizedTime = 0f;
animation.Play("Spikes");
animate = true;
}
interact = true;
playerManager = other.gameObject.GetComponent<PlayerManager>();
}
}
if (objectType == ObjectType.ShowSpikes)
private void OnTriggerExit(Collider other)
{
if (other.gameObject.tag == "Player")
{
if (other.gameObject.tag == "Player")
{
if (actualDamageRate < Time.time)
{
actualDamageRate = Time.time + damageRate;
other.gameObject.GetComponent<PlayerManager>().damage(damage, instaKill);
}
}
interact = false;
playerManager = null;
}
}

View File

@ -30,7 +30,7 @@ public class ObjectManager : MonoBehaviour
{
if (Input.GetKeyUp(KeyCode.E))
{
if (playerManager.GetPushPullObject() == null)
if (playerManager.GetPushPullObject() == null && playerManager.activeAbility.Count > 0 && playerManager.activeAbility[0] == 2)
{
playerManager.SetPushPullObject(this.gameObject);
meshRenderer.materials[1].SetColor("_OutlineColor", new Color(0.5568628f, 0.3785397f, 0.1176471f));
@ -68,8 +68,15 @@ public class ObjectManager : MonoBehaviour
Vector3 hit = collision.contacts[0].normal;
if (hit.x != 0 && hit.y == 0)
{
meshRenderer.materials[1].SetFloat("_Outline", 0.25f);
playerManager = collision.gameObject.GetComponent<PlayerManager>();
if (playerManager.activeAbility.Count > 0 && playerManager.activeAbility[0] == 2)
{
meshRenderer.materials[1].SetFloat("_Outline", 0.25f);
}
else
{
meshRenderer.materials[1].SetFloat("_Outline", 0.0f);
}
interact = true;
}
}