next push
This commit is contained in:
parent
3171553707
commit
a053afbeb6
Binary file not shown.
Binary file not shown.
@ -61,7 +61,7 @@ AnimatorState:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Open 0
|
||||
m_Speed: 1
|
||||
m_Speed: -1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 9167024098706831223}
|
||||
@ -69,7 +69,7 @@ AnimatorState:
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
@ -184,7 +184,7 @@ AnimatorStateTransition:
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
@ -209,7 +209,7 @@ AnimatorStateTransition:
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
|
@ -5,7 +5,7 @@ ModelImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
74: -623603649343465320
|
||||
second: Scene
|
||||
second: Door
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 1
|
||||
@ -26,14 +26,43 @@ ModelImporter:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 3
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
clipAnimations:
|
||||
- serializedVersion: 16
|
||||
name: Door
|
||||
takeName: Scene
|
||||
internalID: 0
|
||||
firstFrame: 1
|
||||
lastFrame: 20
|
||||
wrapMode: 1
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0.96
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
@ -90,7 +119,7 @@ ModelImporter:
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
animationType: 1
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
additionalBone: 0
|
||||
|
@ -11,6 +11,7 @@ GameObject:
|
||||
- component: {fileID: 2404547677224573952}
|
||||
- component: {fileID: 2404547677224573955}
|
||||
- component: {fileID: 7533051242826683670}
|
||||
- component: {fileID: 3536865177621166868}
|
||||
m_Layer: 9
|
||||
m_Name: BarricadeField
|
||||
m_TagString: BarricadeField
|
||||
@ -34,6 +35,8 @@ Transform:
|
||||
- {fileID: 8217677579595806577}
|
||||
- {fileID: 8265306787634748687}
|
||||
- {fileID: 7424955828394515863}
|
||||
- {fileID: 8944436269591692549}
|
||||
- {fileID: 5323199187439907686}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -69,6 +72,84 @@ MonoBehaviour:
|
||||
- {fileID: 4967221228056014620}
|
||||
- {fileID: 4922531016023278946}
|
||||
- {fileID: 5859715434797674372}
|
||||
offMeshLink: {fileID: 3536865177621166868}
|
||||
--- !u!191 &3536865177621166868
|
||||
OffMeshLink:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2404547677224573953}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_AreaIndex: 2
|
||||
m_AgentTypeID: 0
|
||||
m_Start: {fileID: 8944436269591692549}
|
||||
m_End: {fileID: 5323199187439907686}
|
||||
m_CostOverride: -1
|
||||
m_BiDirectional: 1
|
||||
m_Activated: 1
|
||||
m_AutoUpdatePositions: 0
|
||||
--- !u!1 &4107548373133362469
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8944436269591692549}
|
||||
m_Layer: 0
|
||||
m_Name: Point1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8944436269591692549
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4107548373133362469}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -1.591, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2404547677224573952}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &8905797841727913353
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5323199187439907686}
|
||||
m_Layer: 0
|
||||
m_Name: Point2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5323199187439907686
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8905797841727913353}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.465, y: -1.5487, z: 2.2820003}
|
||||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2404547677224573952}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2481493505603696269
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11,7 +11,10 @@ GameObject:
|
||||
- component: {fileID: 7955444202611999372}
|
||||
- component: {fileID: 1386102516830058682}
|
||||
- component: {fileID: 4611938418172478531}
|
||||
- component: {fileID: 3106884048391809432}
|
||||
- component: {fileID: 8296172668023712161}
|
||||
- component: {fileID: 8296172668023712162}
|
||||
- component: {fileID: 8296172668023712163}
|
||||
- component: {fileID: 8296172668023712160}
|
||||
m_Layer: 0
|
||||
m_Name: door
|
||||
m_TagString: Interact
|
||||
@ -26,13 +29,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6358013410880778399}
|
||||
m_LocalRotation: {x: -0.7070953, y: -0.0040263417, z: -0.0040263417, w: 0.7070953}
|
||||
m_LocalRotation: {x: -0.7070954, y: -0.0040232027, z: -0.0040232027, w: 0.7070954}
|
||||
m_LocalPosition: {x: 2.479, y: 0.168, z: 0.768}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: -90.00001, y: 0, z: -0.652}
|
||||
--- !u!33 &1386102516830058682
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -80,22 +83,64 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!95 &3106884048391809432
|
||||
Animator:
|
||||
--- !u!64 &8296172668023712161
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6358013410880778399}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4579454407841743219, guid: c5e781ac470bf2c469882550ede67f06, type: 3}
|
||||
--- !u!208 &8296172668023712162
|
||||
NavMeshObstacle:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6358013410880778399}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 817b98a1c3ed47743bb1013ff6c27e6d, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 1
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
serializedVersion: 3
|
||||
m_Shape: 1
|
||||
m_Extents: {x: 0.527, y: 7.36, z: 12.028001}
|
||||
m_MoveThreshold: 0.1
|
||||
m_Carve: 1
|
||||
m_CarveOnlyStationary: 1
|
||||
m_Center: {x: -0.046000004, y: 7.7770004, z: 12.01}
|
||||
m_TimeToStationary: 0.5
|
||||
--- !u!111 &8296172668023712163
|
||||
Animation:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6358013410880778399}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Animation: {fileID: -623603649343465320, guid: c5e781ac470bf2c469882550ede67f06,
|
||||
type: 3}
|
||||
m_Animations:
|
||||
- {fileID: -623603649343465320, guid: c5e781ac470bf2c469882550ede67f06, type: 3}
|
||||
m_WrapMode: 0
|
||||
m_PlayAutomatically: 1
|
||||
m_AnimatePhysics: 0
|
||||
m_CullingType: 0
|
||||
--- !u!114 &8296172668023712160
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6358013410880778399}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a26079dbac7f3cd4bacb95972241b8cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
blockType: 2
|
||||
health: 100
|
||||
|
@ -121,36 +121,6 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 23800000, guid: 210c0a45ca7dddb429c704640ac83479, type: 2}
|
||||
--- !u!1 &597793628
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 597793629}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &597793629
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597793628}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 12.5, y: 1.93, z: -25.6}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 827899965}
|
||||
m_RootOrder: 13
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -243,35 +213,6 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &827899963 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5859379536716062794, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6179705720582673448}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!191 &827899964
|
||||
OffMeshLink:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 827899963}
|
||||
m_Enabled: 0
|
||||
serializedVersion: 3
|
||||
m_AreaIndex: 2
|
||||
m_AgentTypeID: 0
|
||||
m_Start: {fileID: 1272265850}
|
||||
m_End: {fileID: 597793629}
|
||||
m_CostOverride: -1
|
||||
m_BiDirectional: 1
|
||||
m_Activated: 1
|
||||
m_AutoUpdatePositions: 0
|
||||
--- !u!4 &827899965 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7425287328957043289, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6179705720582673448}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &957927410
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -422,36 +363,6 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1272265849
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1272265850}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1272265850
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1272265849}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 34.08, y: 0, z: -26.01}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 827899965}
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1753935063
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -609,10 +520,6 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_Convex
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6358013410880778399, guid: 907ad6f2d559dba4fa31dec92cfd86c0,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
@ -673,6 +580,11 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8296172668023712163, guid: 907ad6f2d559dba4fa31dec92cfd86c0,
|
||||
type: 3}
|
||||
propertyPath: m_PlayAutomatically
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 907ad6f2d559dba4fa31dec92cfd86c0, type: 3}
|
||||
--- !u!1001 &3163490711718144037
|
||||
@ -687,10 +599,15 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Enemy
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593238991022112296, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: m_StoppingDistance
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5004747464968674621, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 9.257
|
||||
value: 28.51
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5004747464968674621, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
@ -742,6 +659,11 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5433357422100294214, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: attackRate
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b4e392e2cdb417b4c8bdf8e683bceb9b, type: 3}
|
||||
--- !u!1001 &6179705720582673448
|
||||
@ -766,6 +688,21 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 894288988774666842, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.694
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 894288988774666842, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.484
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 894288988774666842, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 918772891678535705, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -776,6 +713,21 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1463118211523030267, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.694
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1463118211523030267, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.484
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1463118211523030267, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1506188309448675000, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -791,6 +743,31 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2346415120754425277, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2346415120754425277, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_BiDirectional
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2346415120754425277, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Activated
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2427653857520573080, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.907
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2427653857520573080, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.365
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2481870090095308757, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -876,11 +853,31 @@ PrefabInstance:
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 20a5ddee6c19a1e4999bf143e6d9ef9e, type: 2}
|
||||
- target: {fileID: 3619360067511567081, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Activated
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3619360067511567081, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3974723396677692687, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4150048399407178809, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.907
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4150048399407178809, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.365
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4154257818617632997, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -916,6 +913,26 @@ PrefabInstance:
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 9ff6a660ccc528244bcbb8f19248c0b0, type: 2}
|
||||
- target: {fileID: 5399879282187881115, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5399879282187881115, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.694
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5399879282187881115, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5399879282187881115, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.484
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5859379536716062794, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
@ -946,6 +963,21 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6366560762045019599, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.882
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6366560762045019599, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.546
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6366560762045019599, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6583081293593051270, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -1021,11 +1053,26 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7819584946190820489, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7896311156661354352, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7900537884288009132, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.907
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7900537884288009132, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.365
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7944950672751888448, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.size
|
||||
@ -1046,6 +1093,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404722193593473576, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8480973484288754129, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@ -1061,6 +1113,21 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 4294967295
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9155520659813448952, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9155520659813448952, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.365
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9155520659813448952, guid: 5322794fa1699704b8e50a14cef106b1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.907
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5322794fa1699704b8e50a14cef106b1, type: 3}
|
||||
--- !u!1001 &7985979212702423926
|
||||
@ -1075,6 +1142,11 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7985979212931499537, guid: 204c7411afdd01a478b1a1e25607d50c,
|
||||
type: 3}
|
||||
propertyPath: m_TagString
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@ -1137,52 +1209,3 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 204c7411afdd01a478b1a1e25607d50c, type: 3}
|
||||
--- !u!1 &8296172668023712159 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 6358013410880778399, guid: 907ad6f2d559dba4fa31dec92cfd86c0,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3106884049359886592}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &8296172668023712160
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8296172668023712159}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a26079dbac7f3cd4bacb95972241b8cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
blockType: 2
|
||||
health: 100
|
||||
--- !u!65 &8296172668023712161
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8296172668023712159}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1.0543461, y: 14.719627, z: 24.056444}
|
||||
m_Center: {x: -0.04609234, y: 7.777424, z: 12.009837}
|
||||
--- !u!208 &8296172668023712162
|
||||
NavMeshObstacle:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8296172668023712159}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Shape: 1
|
||||
m_Extents: {x: 0.527, y: 7.36, z: 12.028001}
|
||||
m_MoveThreshold: 0.1
|
||||
m_Carve: 1
|
||||
m_CarveOnlyStationary: 1
|
||||
m_Center: {x: -0.046000004, y: 7.7770004, z: 12.01}
|
||||
m_TimeToStationary: 0.5
|
||||
|
@ -1,16 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class BarricadeManager : MonoBehaviour
|
||||
{
|
||||
public float health = 0;
|
||||
public List<GameObject> barricadePlanks = new List<GameObject>();
|
||||
public OffMeshLink offMeshLink;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@ -21,12 +22,22 @@ public class BarricadeManager : MonoBehaviour
|
||||
{
|
||||
health = 0;
|
||||
}
|
||||
|
||||
if (health <= 0)
|
||||
{
|
||||
offMeshLink.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
offMeshLink.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void addPlank()
|
||||
{
|
||||
if (health < (barricadePlanks.Count * 10)) {
|
||||
health += 10;
|
||||
offMeshLink.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ public class BlockManager : MonoBehaviour
|
||||
public enum BlockType {None, Barricade, Door, Wood, Ammo};
|
||||
public BlockType blockType = BlockType.None;
|
||||
public float health = 100;
|
||||
private Animator animator;
|
||||
private Animation animation;
|
||||
private bool action = false;
|
||||
|
||||
// Start is called before the first frame update
|
||||
@ -15,7 +15,7 @@ public class BlockManager : MonoBehaviour
|
||||
{
|
||||
if (blockType == BlockType.Door)
|
||||
{
|
||||
animator = this.GetComponent<Animator>();
|
||||
animation = this.GetComponent<Animation>();
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,18 +28,21 @@ public class BlockManager : MonoBehaviour
|
||||
{
|
||||
if (blockType == BlockType.Door)
|
||||
{
|
||||
if (!action)
|
||||
{
|
||||
this.GetComponent<BoxCollider>().isTrigger = true;
|
||||
action = true;
|
||||
if (!animation.isPlaying) {
|
||||
if (!action)
|
||||
{
|
||||
animation["Door"].speed = 1;
|
||||
animation["Door"].time = 0;
|
||||
action = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
animation["Door"].speed = -1;
|
||||
animation["Door"].time = animation["Door"].length;
|
||||
action = false;
|
||||
}
|
||||
animation.Play("Door");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.GetComponent<BoxCollider>().isTrigger = false;
|
||||
action = false;
|
||||
}
|
||||
animator.ResetTrigger("Door");
|
||||
animator.SetTrigger("Door");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public class EnemyManager : MonoBehaviour
|
||||
public float damage = 10;
|
||||
public float attackRate = 2;
|
||||
private float attackTime = 2;
|
||||
private float actualHealth;
|
||||
public float actualHealth;
|
||||
private NavMeshAgent navMeshAgent;
|
||||
private PlayerManager player;
|
||||
private BarricadeManager barricadeManager;
|
||||
@ -30,10 +30,10 @@ public class EnemyManager : MonoBehaviour
|
||||
DropBodyPart();
|
||||
if (actualHealth <= 0)
|
||||
{
|
||||
Destroy(this.gameObject);
|
||||
Destroy(transform.gameObject, 0.1f);
|
||||
}
|
||||
DestroyBarricades();
|
||||
|
||||
Attack();
|
||||
if (navMeshAgent != null && barricadeManager == null)
|
||||
{
|
||||
navMeshAgent.SetDestination(player.transform.position);
|
||||
@ -70,8 +70,9 @@ public class EnemyManager : MonoBehaviour
|
||||
|
||||
void DestroyBarricades()
|
||||
{
|
||||
Debug.Log(navMeshAgent.pathPending);
|
||||
if (navMeshAgent.pathStatus == NavMeshPathStatus.PathInvalid)
|
||||
NavMeshPath path = new NavMeshPath();
|
||||
navMeshAgent.CalculatePath(player.transform.position, path);
|
||||
if (path.status == NavMeshPathStatus.PathPartial)
|
||||
{
|
||||
BarricadeManager[] barricadeManagers = FindObjectsOfType<BarricadeManager>();
|
||||
foreach(BarricadeManager localBarricadeManager in barricadeManagers)
|
||||
@ -82,38 +83,61 @@ public class EnemyManager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Vector3.Distance(barricadeManager.transform.position, transform.position) > Vector3.Distance(localBarricadeManager.transform.position, transform.position)) {
|
||||
if (localBarricadeManager.health <= 0 || Vector3.Distance(barricadeManager.transform.position, transform.position) > Vector3.Distance(localBarricadeManager.transform.position, transform.position)) {
|
||||
barricadeManager = localBarricadeManager;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
barricadeManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
void DropBodyPart()
|
||||
{
|
||||
if (bodyParts.Count > 0)
|
||||
{
|
||||
float number = health / (bodyParts.Count + 1);
|
||||
float number = health / bodyParts.Count;
|
||||
for (int i = 0; i < bodyParts.Count; i++)
|
||||
{
|
||||
if ((health - actualHealth) / number > i)
|
||||
if (bodyParts.Count - 1 != i)
|
||||
{
|
||||
if (bodyParts[i] != null && bodyParts[i].transform.parent != null) {
|
||||
bodyParts[i].transform.parent = null;
|
||||
bodyParts[i].AddComponent<Rigidbody>();
|
||||
Rigidbody rigidBodyEnemy = bodyParts[i].GetComponent<Rigidbody>() as Rigidbody;
|
||||
bodyParts[i].AddComponent<MeshCollider>();
|
||||
MeshCollider meshCollider = bodyParts[i].GetComponent<MeshCollider>() as MeshCollider;
|
||||
meshCollider.convex = true;
|
||||
if (i == bodyParts.Count - 1) {
|
||||
if ((health - actualHealth) / number > i)
|
||||
{
|
||||
if (bodyParts[i] != null && bodyParts[i].transform.parent != null)
|
||||
{
|
||||
bodyParts[i].transform.parent = null;
|
||||
bodyParts[i].AddComponent<Rigidbody>();
|
||||
Rigidbody rigidBodyEnemy = bodyParts[i].GetComponent<Rigidbody>() as Rigidbody;
|
||||
bodyParts[i].AddComponent<MeshCollider>();
|
||||
MeshCollider meshCollider = bodyParts[i].GetComponent<MeshCollider>() as MeshCollider;
|
||||
meshCollider.convex = true;
|
||||
rigidBodyEnemy.mass = 10 * bodyParts.Count;
|
||||
Destroy(bodyParts[i], 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (actualHealth == 0)
|
||||
{
|
||||
if (bodyParts[i] != null && bodyParts[i].transform.parent != null)
|
||||
{
|
||||
bodyParts[i].transform.parent = null;
|
||||
bodyParts[i].AddComponent<Rigidbody>();
|
||||
Rigidbody rigidBodyEnemy = bodyParts[i].GetComponent<Rigidbody>() as Rigidbody;
|
||||
bodyParts[i].AddComponent<MeshCollider>();
|
||||
MeshCollider meshCollider = bodyParts[i].GetComponent<MeshCollider>() as MeshCollider;
|
||||
meshCollider.convex = true;
|
||||
navMeshAgent.isStopped = true;
|
||||
navMeshAgent.enabled = false;
|
||||
navMeshAgent = null;
|
||||
rigidBodyEnemy.velocity = bodyParts[i].transform.forward;
|
||||
rigidBodyEnemy.mass = 10 * bodyParts.Count;
|
||||
Destroy(bodyParts[i], 4);
|
||||
}
|
||||
rigidBodyEnemy.mass = 10 * bodyParts.Count;
|
||||
Destroy(bodyParts[i], 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -123,7 +147,7 @@ public class EnemyManager : MonoBehaviour
|
||||
void Attack()
|
||||
{
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(transform.position + new Vector3(0,1,0),transform.forward,out hit,2) && attackTime <= Time.time)
|
||||
if (Physics.Raycast(transform.position + new Vector3(0,1f,0),transform.forward,out hit,2) && attackTime <= Time.time)
|
||||
{
|
||||
if (hit.transform.CompareTag("Player"))
|
||||
{
|
||||
@ -137,6 +161,7 @@ public class EnemyManager : MonoBehaviour
|
||||
barricadeManager.Damage(damage);
|
||||
}
|
||||
}
|
||||
attackTime = attackRate + Time.time;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class PlayerManager : MonoBehaviour
|
||||
{
|
||||
Ray ray = playerCamera.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(ray, out hit, 1))
|
||||
if (Physics.Raycast(ray, out hit, 2))
|
||||
{
|
||||
if (Input.GetAxisRaw("Build") > 0 && buildTime < Time.time && barricadeMaterials > 0 && hit.transform.tag == "BarricadeField")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user