diff --git a/Assets/LaserMesh.vmdl b/Assets/LaserMesh.vmdl new file mode 100644 index 0000000..a7dcc58 --- /dev/null +++ b/Assets/LaserMesh.vmdl @@ -0,0 +1,77 @@ + +{ + rootNode = + { + _class = "RootNode" + children = + [ + { + _class = "MaterialGroupList" + children = + [ + { + _class = "DefaultMaterialGroup" + remaps = + [ + ] + use_global_default = false + global_default_material = "materials/default.vmat" + }, + ] + }, + { + _class = "RenderMeshList" + children = + [ + { + _class = "RenderMeshFile" + filename = "models/LaserMesh/LaserMesh.fbx" + import_translation = [ 0.0, 0.0, 0.0 ] + import_rotation = [ 0.0, 0.0, 0.0 ] + import_scale = 1 + align_origin_x_type = "None" + align_origin_y_type = "None" + align_origin_z_type = "None" + parent_bone = "" + import_filter = + { + exclude_by_default = false + exception_list = [] + } + }, + ] + }, + { + _class = "ModelModifierList" + children = + [ + { + _class = "ModelModifier_ScaleAndMirror" + scale = 0.3937000036239624 + mirror_x = false + mirror_y = false + mirror_z = false + flip_bone_forward = false + swap_left_and_right_bones = false + }, + ] + }, + { + _class = "PhysicsShapeList" + children = + [ + { + _class = "PhysicsMeshFromRender" + parent_bone = "" + surface_prop = "default" + collision_tags = "solid" + }, + ] + } + ] + model_archetype = "" + primary_associated_entity = "" + anim_graph_name = "" + base_model_name = "" + } +} \ No newline at end of file diff --git a/Assets/Pistol.vmdl b/Assets/Pistol.vmdl new file mode 100644 index 0000000..86a2987 --- /dev/null +++ b/Assets/Pistol.vmdl @@ -0,0 +1,146 @@ + +{ + rootNode = + { + _class = "RootNode" + children = + [ + { + _class = "MaterialGroupList" + children = + [ + { + _class = "DefaultMaterialGroup" + remaps = + [ + { + from = "fabric.003.vmat" + to = "materials/pistol/fabric.003.vmat" + }, + { + from = "glow.vmat" + to = "materials/pistol/glow.vmat" + }, + { + from = "plastic.vmat" + to = "materials/pistol/plastic.vmat" + }, + { + from = "metal.1.vmat" + to = "materials/pistol/metal.1.vmat" + }, + ] + use_global_default = false + global_default_material = "materials/default.vmat" + }, + ] + }, + { + _class = "RenderMeshList" + children = + [ + { + _class = "RenderMeshFile" + filename = "models/my_citizen/pistol_new.fbx" + import_translation = [ 0.0, 0.0, 0.0 ] + import_rotation = [ 0.0, 0.0, 0.0 ] + import_scale = 1.0 + align_origin_x_type = "None" + align_origin_y_type = "None" + align_origin_z_type = "None" + parent_bone = "" + import_filter = + { + exclude_by_default = false + exception_list = [ ] + } + }, + ] + }, + { + _class = "ModelModifierList" + children = + [ + { + _class = "ModelModifier_ScaleAndMirror" + scale = 0.3937 + mirror_x = false + mirror_y = false + mirror_z = false + flip_bone_forward = false + swap_left_and_right_bones = false + }, + ] + }, + { + _class = "PhysicsShapeList" + children = + [ + { + _class = "PhysicsMeshFromRender" + parent_bone = "" + surface_prop = "default" + collision_tags = "solid" + }, + ] + }, + { + _class = "AnimationList" + children = + [ + { + _class = "AnimFile" + name = "pistol_new" + activity_name = "" + activity_weight = 1 + weight_list_name = "" + fade_in_time = 0.2 + fade_out_time = 0.2 + looping = false + delta = false + worldSpace = false + hidden = false + anim_markup_ordered = false + disable_compression = false + disable_interpolation = false + enable_scale = false + source_filename = "models/my_citizen/pistol_new.fbx" + start_frame = -1 + end_frame = -1 + framerate = -1.0 + take = 1 + reverse = false + }, + { + _class = "AnimFile" + name = "pistol_new1" + activity_name = "Fire" + activity_weight = 1 + weight_list_name = "" + fade_in_time = 0.2 + fade_out_time = 0.2 + looping = false + delta = false + worldSpace = false + hidden = false + anim_markup_ordered = false + disable_compression = false + disable_interpolation = false + enable_scale = false + source_filename = "models/my_citizen/pistol_new.fbx" + start_frame = -1 + end_frame = -1 + framerate = -1.0 + take = 0 + reverse = false + }, + ] + default_root_bone_name = "" + }, + ] + model_archetype = "" + primary_associated_entity = "" + anim_graph_name = "animgraphs/pistol.vanmgrph" + base_model_name = "" + } +} \ No newline at end of file diff --git a/Assets/animgraphs/pistol.vanmgrph b/Assets/animgraphs/pistol.vanmgrph new file mode 100644 index 0000000..9e3b2b8 --- /dev/null +++ b/Assets/animgraphs/pistol.vanmgrph @@ -0,0 +1,282 @@ + +{ + _class = "CAnimationGraph" + m_nodeManager = + { + _class = "CAnimNodeManager" + m_nodes = + [ + { + key = + { + m_id = 80340519 + } + value = + { + _class = "CStateMachineAnimNode" + m_sName = "Unnamed" + m_vecPosition = [ -256.0, -192.0 ] + m_nNodeID = + { + m_id = 80340519 + } + m_sNote = "" + m_states = + [ + { + _class = "CAnimState" + m_transitions = + [ + { + _class = "CAnimStateTransition" + m_conditions = + [ + { + _class = "CParameterAnimCondition" + m_comparisonOp = 0 + m_paramID = + { + m_id = 99224662 + } + m_comparisonValue = + { + m_nType = 1 + m_data = true + } + }, + ] + m_blendDuration = 0.2 + m_destState = + { + m_id = 52598034 + } + m_bReset = true + m_resetCycleOption = "Beginning" + m_flFixedCycleValue = 0.0 + m_bBlendCycle = false + m_blendCurve = + { + m_vControlPoint1 = [ 0.5, 0.0 ] + m_vControlPoint2 = [ 0.5, 1.0 ] + } + m_bForceFootPlant = false + m_bDisabled = false + m_bRandomTimeBetween = false + m_flRandomTimeStart = 0.0 + m_flRandomTimeEnd = 0.0 + }, + ] + m_tags = [ ] + m_tagBehaviors = [ ] + m_name = "idle" + m_inputConnection = + { + m_nodeID = + { + m_id = 4294967295 + } + m_outputID = + { + m_id = 4294967295 + } + } + m_stateID = + { + m_id = 556431534 + } + m_position = [ -144.0, -96.0 ] + m_bIsStartState = true + m_bIsEndtState = false + m_bIsPassthrough = false + m_bIsRootMotionExclusive = false + m_bAlwaysEvaluate = false + }, + { + _class = "CAnimState" + m_transitions = + [ + { + _class = "CAnimStateTransition" + m_conditions = + [ + { + _class = "CFinishedCondition" + m_comparisonOp = 0 + m_option = "FinishedConditionOption_OnFinished" + m_bIsFinished = true + }, + { + _class = "CTimeCondition" + m_comparisonOp = 3 + m_comparisonValue = 0.1 + }, + ] + m_blendDuration = 0.2 + m_destState = + { + m_id = 556431534 + } + m_bReset = true + m_resetCycleOption = "Beginning" + m_flFixedCycleValue = 0.0 + m_bBlendCycle = false + m_blendCurve = + { + m_vControlPoint1 = [ 0.5, 0.0 ] + m_vControlPoint2 = [ 0.5, 1.0 ] + } + m_bForceFootPlant = false + m_bDisabled = false + m_bRandomTimeBetween = false + m_flRandomTimeStart = 0.0 + m_flRandomTimeEnd = 0.0 + }, + ] + m_tags = [ ] + m_tagBehaviors = [ ] + m_name = "shoot" + m_inputConnection = + { + m_nodeID = + { + m_id = 478164850 + } + m_outputID = + { + m_id = 4294967295 + } + } + m_stateID = + { + m_id = 52598034 + } + m_position = [ -16.0, -96.0 ] + m_bIsStartState = false + m_bIsEndtState = false + m_bIsPassthrough = false + m_bIsRootMotionExclusive = false + m_bAlwaysEvaluate = false + }, + ] + m_bBlockWaningTags = false + m_bLockStateWhenWaning = false + } + }, + { + key = + { + m_id = 478164850 + } + value = + { + _class = "CSequenceAnimNode" + m_sName = "fire" + m_vecPosition = [ -464.0, -48.0 ] + m_nNodeID = + { + m_id = 478164850 + } + m_sNote = "" + m_tagSpans = [ ] + m_sequenceName = "pistol_new" + m_playbackSpeed = 2.0 + m_bLoop = false + } + }, + { + key = + { + m_id = 1221959074 + } + value = + { + _class = "CRootAnimNode" + m_sName = "Unnamed" + m_vecPosition = [ -16.0, -48.0 ] + m_nNodeID = + { + m_id = 1221959074 + } + m_sNote = "" + m_inputConnection = + { + m_nodeID = + { + m_id = 80340519 + } + m_outputID = + { + m_id = 4294967295 + } + } + } + }, + ] + } + m_pParameterList = + { + _class = "CAnimParameterList" + m_Parameters = + [ + { + _class = "CBoolAnimParameter" + m_name = "Fire" + m_id = + { + m_id = 99224662 + } + m_previewButton = "ANIMPARAM_BUTTON_NONE" + m_bUseMostRecentValue = false + m_bAutoReset = true + m_bDefaultValue = false + }, + ] + } + m_pTagManager = + { + _class = "CAnimTagManager" + m_tags = [ ] + } + m_pMovementManager = + { + _class = "CAnimMovementManager" + m_MotorList = + { + _class = "CAnimMotorList" + m_motors = [ ] + } + m_MovementSettings = + { + _class = "CAnimMovementSettings" + m_bShouldCalculateSlope = false + } + } + m_pSettingsManager = + { + _class = "CAnimGraphSettingsManager" + m_settingsGroups = + [ + { + _class = "CAnimGraphGeneralSettings" + m_iGridSnap = 16 + }, + ] + } + m_pActivityValuesList = + { + _class = "CActivityValueList" + m_activities = [ ] + } + m_previewModels = + [ + "models/my_citizen/pistol_new.vmdl", + ] + m_boneMergeModels = [ ] + m_cameraSettings = + { + m_flFov = 60.0 + m_sLockBoneName = "Bone" + m_bLockCamera = false + m_bViewModelCamera = false + } +} \ No newline at end of file diff --git a/Assets/materials/pistol/fabric.003.vmat b/Assets/materials/pistol/fabric.003.vmat new file mode 100644 index 0000000..d588faf --- /dev/null +++ b/Assets/materials/pistol/fabric.003.vmat @@ -0,0 +1,42 @@ +// THIS FILE IS AUTO-GENERATED + +Layer0 +{ + shader "shaders/complex.shader" + + //---- PBR ---- + F_SPECULAR 1 + + //---- Ambient Occlusion ---- + g_flAmbientOcclusionDirectDiffuse "0.000" + g_flAmbientOcclusionDirectSpecular "0.000" + TextureAmbientOcclusion "materials/default/default_ao.tga" + + //---- Color ---- + g_flModelTintAmount "1.000" + g_vColorTint "[1.000000 1.000000 1.000000 1.000000]" + TextureColor "textures/Pistol/Fabric080_1K-PNG_Color.png" + + //---- Fade ---- + g_flFadeExponent "1.000" + + //---- Fog ---- + g_bFogEnabled "1" + + //---- Metalness ---- + g_flMetalness "0.000" + + //---- Normal ---- + TextureNormal "textures/Pistol/Fabric080_1K-PNG_NormalGL_norm.png" + + //---- Roughness ---- + g_flRoughnessScaleFactor "2.000" + TextureRoughness "textures/Pistol/Fabric080_1K-PNG_Roughness.png" + + //---- Texture Coordinates ---- + g_nScaleTexCoordUByModelScaleAxis "0" + g_nScaleTexCoordVByModelScaleAxis "0" + g_vTexCoordOffset "[0.000 0.000]" + g_vTexCoordScale "[1.000 1.000]" + g_vTexCoordScrollSpeed "[0.000 0.000]" +} \ No newline at end of file diff --git a/Assets/materials/pistol/glow.vmat b/Assets/materials/pistol/glow.vmat new file mode 100644 index 0000000..f6f3534 --- /dev/null +++ b/Assets/materials/pistol/glow.vmat @@ -0,0 +1,51 @@ +// THIS FILE IS AUTO-GENERATED + +Layer0 +{ + shader "shaders/complex.shader" + + //---- PBR ---- + F_SELF_ILLUM 1 + F_SPECULAR 1 + + //---- Ambient Occlusion ---- + g_flAmbientOcclusionDirectDiffuse "0.000" + g_flAmbientOcclusionDirectSpecular "0.000" + TextureAmbientOcclusion "materials/default/default_ao.tga" + + //---- Color ---- + g_flModelTintAmount "1.000" + g_vColorTint "[0.019608 0.000000 1.000000 1.000000]" + TextureColor "materials/default/default_color.tga" + + //---- Fade ---- + g_flFadeExponent "1.000" + + //---- Fog ---- + g_bFogEnabled "1" + + //---- Metalness ---- + g_flMetalness "0.000" + + //---- Normal ---- + TextureNormal "materials/default/default_normal.tga" + + //---- Roughness ---- + g_flRoughnessScaleFactor "0.000" + TextureRoughness "materials/default/default_rough.tga" + + //---- Self Illum ---- + g_flSelfIllumAlbedoFactor "1.000" + g_flSelfIllumBrightness "10.000" + g_flSelfIllumScale "16.000" + g_vSelfIllumScrollSpeed "[0.000 0.000]" + g_vSelfIllumTint "[0.054902 0.043137 0.807843 1.000000]" + TextureSelfIllumMask "[1.000000 1.000000 1.000000 0.000000]" + + //---- Texture Coordinates ---- + g_nScaleTexCoordUByModelScaleAxis "0" + g_nScaleTexCoordVByModelScaleAxis "0" + g_vTexCoordOffset "[0.000 0.000]" + g_vTexCoordScale "[1.000 1.000]" + g_vTexCoordScrollSpeed "[0.000 0.000]" +} \ No newline at end of file diff --git a/Assets/materials/pistol/glow_2.vmat b/Assets/materials/pistol/glow_2.vmat new file mode 100644 index 0000000..6ef3a80 --- /dev/null +++ b/Assets/materials/pistol/glow_2.vmat @@ -0,0 +1,36 @@ +// THIS FILE IS AUTO-GENERATED + +Layer0 +{ + shader "shaders/glass_scope.shader" + + //---- Fog ---- + g_bFogEnabled "0" + + //---- Glass ---- + g_flBlurAmount "0.696" + g_flIridescence "821.429" + g_flIridescenceScale "10.000" + g_flRefractionStrength "1.009" + g_flSightDistanceScale "4.167" + g_vSightLightColor "[0.019608 0.019608 0.458824 1.000000]" + + //---- Material ---- + g_flTintColor "[1.000000 0.262745 0.000000 0.000000]" + TextureAmbientOcclusion "materials/default/default_ao.tga" + TextureBlendMask "[0.000000 0.000000 0.000000 0.000000]" + TextureColor "[0.254902 0.411765 0.882353 1.000000]" + TextureMetalness "[0.000000 0.000000 0.000000 0.000000]" + TextureNormal "materials/default/default_normal.tga" + TextureRoughness "[1.000000 1.000000 1.000000 0.000000]" + TextureTintMask "[0.983000 0.983000 0.983000 0.000000]" + TextureTranslucency "[0.000000 0.000000 0.000000 0.000000]" + + //---- Sight Dot ---- + RedDot "materials/default/default_color.tga" + RedDot2 "materials/default/default_color.tga" + RedDot3 "materials/default/default_color.tga" + + //---- Translucent ---- + g_flOpacityScale "0.054" +} \ No newline at end of file diff --git a/Assets/materials/pistol/metal.1.vmat b/Assets/materials/pistol/metal.1.vmat new file mode 100644 index 0000000..53775e2 --- /dev/null +++ b/Assets/materials/pistol/metal.1.vmat @@ -0,0 +1,43 @@ +// THIS FILE IS AUTO-GENERATED + +Layer0 +{ + shader "shaders/complex.shader" + + //---- PBR ---- + F_METALNESS_TEXTURE 1 + F_SPECULAR 1 + + //---- Ambient Occlusion ---- + g_flAmbientOcclusionDirectDiffuse "0.000" + g_flAmbientOcclusionDirectSpecular "0.000" + TextureAmbientOcclusion "materials/default/default_ao.tga" + + //---- Color ---- + g_flModelTintAmount "1.000" + g_vColorTint "[1.000000 1.000000 1.000000 1.000000]" + TextureColor "textures/Pistol/Metal055A_1K-PNG_Color.png" + + //---- Fade ---- + g_flFadeExponent "1.000" + + //---- Fog ---- + g_bFogEnabled "1" + + //---- Metalness ---- + TextureMetalness "textures/Pistol/Metal055A_1K-PNG_Metalness.png" + + //---- Normal ---- + TextureNormal "textures/Pistol/Metal055A_1K-PNG_NormalGL_norm.png" + + //---- Roughness ---- + g_flRoughnessScaleFactor "1.012" + TextureRoughness "textures/Pistol/Metal055A_1K-PNG_Roughness.png" + + //---- Texture Coordinates ---- + g_nScaleTexCoordUByModelScaleAxis "0" + g_nScaleTexCoordVByModelScaleAxis "0" + g_vTexCoordOffset "[0.000 0.000]" + g_vTexCoordScale "[1.000 1.000]" + g_vTexCoordScrollSpeed "[0.000 0.000]" +} \ No newline at end of file diff --git a/Assets/materials/pistol/plastic.vmat b/Assets/materials/pistol/plastic.vmat new file mode 100644 index 0000000..8c57bf6 --- /dev/null +++ b/Assets/materials/pistol/plastic.vmat @@ -0,0 +1,42 @@ +// THIS FILE IS AUTO-GENERATED + +Layer0 +{ + shader "shaders/complex.shader" + + //---- PBR ---- + F_SPECULAR 1 + + //---- Ambient Occlusion ---- + g_flAmbientOcclusionDirectDiffuse "0.000" + g_flAmbientOcclusionDirectSpecular "0.000" + TextureAmbientOcclusion "materials/default/default_ao.tga" + + //---- Color ---- + g_flModelTintAmount "1.000" + g_vColorTint "[0.141176 0.141176 0.141176 1.000000]" + TextureColor "materials/default/default_color.tga" + + //---- Fade ---- + g_flFadeExponent "1.000" + + //---- Fog ---- + g_bFogEnabled "1" + + //---- Metalness ---- + g_flMetalness "0.000" + + //---- Normal ---- + TextureNormal "textures/Pistol/Plastic018A_1K-PNG_NormalDX_norm.png" + + //---- Roughness ---- + g_flRoughnessScaleFactor "0.607" + TextureRoughness "textures/Pistol/Plastic018A_1K-PNG_Roughness.png" + + //---- Texture Coordinates ---- + g_nScaleTexCoordUByModelScaleAxis "0" + g_nScaleTexCoordVByModelScaleAxis "0" + g_vTexCoordOffset "[0.000 0.000]" + g_vTexCoordScale "[1.000 1.000]" + g_vTexCoordScrollSpeed "[0.000 0.000]" +} \ No newline at end of file diff --git a/Assets/models/LaserMesh/LaserMesh.fbx b/Assets/models/LaserMesh/LaserMesh.fbx new file mode 100644 index 0000000..8351472 --- /dev/null +++ b/Assets/models/LaserMesh/LaserMesh.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af8af070f5dcaa0cb8c2ab4c6a732516d4c6d7316270c710387a03af0786e3d3 +size 13820 diff --git a/Assets/models/my_citizen/pistol_1.fbx b/Assets/models/my_citizen/pistol_1.fbx new file mode 100644 index 0000000..a3d4b7b --- /dev/null +++ b/Assets/models/my_citizen/pistol_1.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6a73caed3e85c3f7efc6039bc0862971cc45e182f7b4efa88e9bcdc3bdd4899 +size 23948 diff --git a/Assets/models/my_citizen/pistol_1.vmdl b/Assets/models/my_citizen/pistol_1.vmdl new file mode 100644 index 0000000..ad34b16 --- /dev/null +++ b/Assets/models/my_citizen/pistol_1.vmdl @@ -0,0 +1,89 @@ + +{ + rootNode = + { + _class = "RootNode" + children = + [ + { + _class = "MaterialGroupList" + children = + [ + { + _class = "DefaultMaterialGroup" + remaps = [ ] + use_global_default = true + global_default_material = "materials/default.vmat" + }, + ] + }, + { + _class = "RenderMeshList" + children = + [ + { + _class = "RenderMeshFile" + filename = "models/my_citizen/pistol_1.fbx" + import_translation = [ 0.0, 0.0, 0.0 ] + import_rotation = [ 0.0, 0.0, 0.0 ] + import_scale = 1.0 + align_origin_x_type = "None" + align_origin_y_type = "None" + align_origin_z_type = "None" + parent_bone = "" + import_filter = + { + exclude_by_default = true + exception_list = + [ + "Laser_low", + "Mag_low", + "Magdown_low", + "Slide_low", + "Trigger_low", + "Barell_low", + "Body_low", + "Button_low", + "Hook_low", + ] + } + }, + ] + }, + { + _class = "AnimationList" + children = + [ + { + _class = "AnimFile" + name = "shoot" + activity_name = " " + activity_weight = 1 + weight_list_name = "" + fade_in_time = 0.2 + fade_out_time = 0.2 + looping = false + delta = false + worldSpace = false + hidden = false + anim_markup_ordered = false + disable_compression = false + disable_interpolation = false + enable_scale = false + source_filename = "models/my_citizen/shoot.fbx" + start_frame = -1 + end_frame = -1 + framerate = -1.0 + take = 0 + reverse = false + }, + ] + default_root_bone_name = "" + }, + ] + model_archetype = "" + primary_associated_entity = "" + anim_graph_name = "" + base_model_name = "" + } +} \ No newline at end of file diff --git a/Assets/models/my_citizen/pistol_new.fbx b/Assets/models/my_citizen/pistol_new.fbx new file mode 100644 index 0000000..b830c5b --- /dev/null +++ b/Assets/models/my_citizen/pistol_new.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd23dd0768677d1c2d801d2ef17d5659cb481bca48f8dfdec206a946fffcaa7 +size 356796 diff --git a/Assets/models/my_citizen/pistol_new.vmdl b/Assets/models/my_citizen/pistol_new.vmdl new file mode 100644 index 0000000..0e3d461 --- /dev/null +++ b/Assets/models/my_citizen/pistol_new.vmdl @@ -0,0 +1,89 @@ + +{ + rootNode = + { + _class = "RootNode" + children = + [ + { + _class = "MaterialGroupList" + children = + [ + { + _class = "DefaultMaterialGroup" + remaps = [ ] + use_global_default = true + global_default_material = "materials/default.vmat" + }, + ] + }, + { + _class = "RenderMeshList" + children = + [ + { + _class = "RenderMeshFile" + filename = "models/my_citizen/pistol_new.fbx" + import_translation = [ 0.0, 0.0, 0.0 ] + import_rotation = [ 0.0, 0.0, 0.0 ] + import_scale = 1.0 + align_origin_x_type = "None" + align_origin_y_type = "None" + align_origin_z_type = "None" + parent_bone = "" + import_filter = + { + exclude_by_default = true + exception_list = + [ + "Barell_low", + "Body_low", + "Button_low", + "Hook_low", + "Laser_low", + "Mag_low", + "Magdown_low", + "Trigger_low", + "Slide_low", + ] + } + }, + ] + }, + { + _class = "AnimationList" + children = + [ + { + _class = "AnimFile" + name = "pistol_new" + activity_name = "" + activity_weight = 1 + weight_list_name = "" + fade_in_time = 0.2 + fade_out_time = 0.2 + looping = false + delta = false + worldSpace = false + hidden = false + anim_markup_ordered = false + disable_compression = false + disable_interpolation = false + enable_scale = false + source_filename = "models/my_citizen/pistol_new.fbx" + start_frame = -1 + end_frame = -1 + framerate = -1.0 + take = 1 + reverse = false + }, + ] + default_root_bone_name = "" + }, + ] + model_archetype = "" + primary_associated_entity = "" + anim_graph_name = "" + base_model_name = "" + } +} \ No newline at end of file diff --git a/Assets/models/pistol/pistol.fbx b/Assets/models/pistol/pistol.fbx new file mode 100644 index 0000000..8c7e145 --- /dev/null +++ b/Assets/models/pistol/pistol.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb2d7676b68974e470427e875fadbdf5982355f858ada20d51a6be6cd6e5e33f +size 301708 diff --git a/Assets/models/pistol/pistol.vmdl b/Assets/models/pistol/pistol.vmdl new file mode 100644 index 0000000..4d9f1e1 --- /dev/null +++ b/Assets/models/pistol/pistol.vmdl @@ -0,0 +1,111 @@ + +{ + rootNode = + { + _class = "RootNode" + children = + [ + { + _class = "MaterialGroupList" + children = + [ + { + _class = "DefaultMaterialGroup" + remaps = + [ + { + from = "metal.1.vmat" + to = "materials/pistol/metal.1.vmat" + }, + { + from = "glow.vmat" + to = "materials/pistol/glow.vmat" + }, + { + from = "fabric.003.vmat" + to = "materials/pistol/fabric.003.vmat" + }, + { + from = "plastic.vmat" + to = "materials/pistol/plastic.vmat" + }, + ] + use_global_default = false + global_default_material = "materials/default.vmat" + }, + ] + }, + { + _class = "RenderMeshList" + children = + [ + { + _class = "RenderMeshFile" + filename = "models/pistol/pistol.fbx" + import_translation = [ 0.0, 0.0, 0.0 ] + import_rotation = [ 0.0, 0.0, 0.0 ] + import_scale = 1.0 + align_origin_x_type = "None" + align_origin_y_type = "None" + align_origin_z_type = "None" + parent_bone = "" + import_filter = + { + exclude_by_default = false + exception_list = [ ] + } + }, + ] + }, + { + _class = "ModelModifierList" + children = + [ + { + _class = "ModelModifier_ScaleAndMirror" + scale = 0.3937 + mirror_x = false + mirror_y = false + mirror_z = false + flip_bone_forward = false + swap_left_and_right_bones = false + }, + ] + }, + { + _class = "AnimationList" + children = + [ + { + _class = "AnimFile" + name = "shoot" + activity_name = "" + activity_weight = 1 + weight_list_name = "" + fade_in_time = 0.2 + fade_out_time = 0.2 + looping = false + delta = false + worldSpace = false + hidden = false + anim_markup_ordered = false + disable_compression = false + disable_interpolation = false + enable_scale = false + source_filename = "models/my_citizen/shoot.fbx" + start_frame = -1 + end_frame = -1 + framerate = -1.0 + take = 0 + reverse = false + }, + ] + default_root_bone_name = "" + }, + ] + model_archetype = "" + primary_associated_entity = "" + anim_graph_name = "" + base_model_name = "" + } +} \ No newline at end of file diff --git a/Assets/prefabs/bullet_test.prefab b/Assets/prefabs/bullet_test.prefab new file mode 100644 index 0000000..2c0666c --- /dev/null +++ b/Assets/prefabs/bullet_test.prefab @@ -0,0 +1,1187 @@ +{ + "RootObject": { + "__guid": "74dd7da7-4dbe-439e-8d7b-b5031de18bfb", + "Flags": 0, + "Name": "bullet_test", + "Scale": "0.5,0.5,0.5", + "Tags": "bullet", + "Enabled": true, + "NetworkMode": 1, + "OwnerTransfer": 0, + "Components": [ + { + "__type": "Sandbox.SphereCollider", + "__guid": "e827c302-9e22-42b5-913b-002be8da7f6d", + "Center": "0,0,0", + "Friction": null, + "IsTrigger": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Radius": 2.4999363, + "Static": false, + "Surface": null, + "SurfaceVelocity": "0,0,0" + }, + { + "__type": "PhysBullet", + "__guid": "c6a8466a-82ae-4b4f-bd48-19cdf0691cca", + "BRigidbody": { + "_type": "component", + "component_id": "b10e4442-809d-426f-930d-46dcb637aff1", + "go": "74dd7da7-4dbe-439e-8d7b-b5031de18bfb", + "component_type": "Rigidbody" + }, + "collider": { + "_type": "component", + "component_id": "ad2a3a05-9aec-4efd-9836-048c65d1643c", + "go": "ca5f6762-e82a-4ed3-98af-ca6176690a5a", + "component_type": "SphereCollider" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null + }, + { + "__type": "Sandbox.Rigidbody", + "__guid": "b10e4442-809d-426f-930d-46dcb637aff1", + "AngularDamping": 0, + "Gravity": false, + "LinearDamping": 0, + "Locking": { + "X": false, + "Y": false, + "Z": false, + "Pitch": false, + "Yaw": false, + "Roll": false + }, + "MassCenterOverride": "0,0,0", + "MassOverride": 500, + "MotionEnabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OverrideMassCenter": false, + "RigidbodyFlags": 0, + "StartAsleep": false + }, + { + "__type": "Sandbox.SoundPointComponent", + "__guid": "814d2b39-5e43-4051-bde6-298583755993", + "__enabled": false, + "Distance": 512, + "DistanceAttenuation": false, + "DistanceAttenuationOverride": false, + "Falloff": [ + { + "x": 0, + "y": 1, + "in": 3.1415927, + "out": -3.1415927, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Force2d": false, + "MaxRepeatTime": 1, + "MinRepeatTime": 1, + "Occlusion": false, + "OcclusionOverride": false, + "OcclusionRadius": 32, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Pitch": 1, + "PlayOnStart": true, + "ReflectionOverride": false, + "Reflections": false, + "Repeat": false, + "SoundEvent": "sounds/shoot_sound_1.sound", + "SoundOverride": false, + "StopOnNew": false, + "TargetMixer": { + "Name": "unknown", + "Id": "00000000-0000-0000-0000-000000000000" + }, + "Volume": 1 + } + ], + "Children": [ + { + "__guid": "ca5f6762-e82a-4ed3-98af-ca6176690a5a", + "Flags": 0, + "Name": "ragdollCollider", + "Scale": "0.3005115,0.3005115,0.3005115", + "Enabled": true, + "Components": [ + { + "__type": "Sandbox.SphereCollider", + "__guid": "ad2a3a05-9aec-4efd-9836-048c65d1643c", + "Center": "0,0,0", + "Friction": null, + "IsTrigger": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Radius": 131.90024, + "Static": false, + "Surface": null, + "SurfaceVelocity": "0,0,0" + } + ], + "Children": [] + }, + { + "__guid": "94aaf1f7-56c3-49b1-aa65-0209c624481e", + "Flags": 0, + "Name": "Bullet", + "Scale": "8,8,8", + "Enabled": true, + "Components": [ + { + "__type": "Sandbox.SkinnedModelRenderer", + "__guid": "8d3ae5b2-ff39-4ff2-b59b-ec0a7035e1c2", + "AnimationGraph": null, + "BodyGroups": 1, + "BoneMergeTarget": null, + "CreateAttachments": false, + "CreateBoneObjects": false, + "MaterialGroup": null, + "MaterialOverride": null, + "Model": "models/weapons/sbox_ammo/9mm_bullet/9mm_bullet.vmdl", + "Morphs": {}, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Parameters": { + "bools": {}, + "ints": {}, + "floats": {}, + "vectors": {}, + "rotations": {} + }, + "PlaybackRate": 1, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Sequence": { + "Name": null, + "Looping": true + }, + "Tint": "1,1,1,1", + "UseAnimGraph": false + } + ], + "Children": [] + }, + { + "__guid": "6e12833a-574d-45d2-9604-31fc44cd13c9", + "Flags": 0, + "Name": "impact_default", + "Rotation": "0,0,0,0", + "Tags": "particles", + "Enabled": true, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "5867c77b-c725-4674-a4bd-9e2063c481fe", + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.5899015, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 3.0277781, + "out": -3.0277781, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 0.01, + "Brightness": 1, + "Bumpiness": 0.2, + "Collision": true, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 0.5, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "0,0,-900", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Range", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "0.22772,0.19616,0.19616,1", + "ConstantB": "0.15842,0.14024,0.11058,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.2,5,0,0" + }, + "MaxParticles": 5000, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0, + "y": 0.925, + "in": -0.2692305, + "out": 0.2692305, + "mode": "Mirrored" + }, + { + "x": 0.6908867, + "y": 0.95, + "in": -0.056075174, + "out": 0.056075174, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 2.9152544, + "out": -2.9152544, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.8,1.2,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "World", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "50,400,0,0" + }, + "Stretch": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,1,0,0" + }, + "TimeScale": 1, + "Tint": "1,1,1,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "d35bcfa7-40fa-467b-99e7-bb3f2a832153", + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.91, + "BlurSpacing": 0.35, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": true, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 1, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/shapes/sharp2.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "98732a37-0582-43a2-9c8b-e7188df9e067", + "Burst": 8, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 70, + "ConeFar": 16, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": true, + "Duration": 5, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [ + { + "__guid": "ccadee94-3f84-48f4-a2ba-a5e8e8d4bd0c", + "Flags": 0, + "Name": "Smoke", + "Position": "2.014441,0,0", + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "edaf7e88-a4ae-48e3-88f3-e632bebed14d", + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 0.21428578, + "in": 0.48571464, + "out": -0.48571464, + "mode": "Mirrored" + }, + { + "x": 0.4827586, + "y": 0.039285716, + "in": 0.1290322, + "out": -0.1290322, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0.059259344, + "out": -0.059259344, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 1, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": -3.0120494, + "out": 3.0120494, + "mode": "Mirrored" + }, + { + "x": 0.08004926, + "y": 0.7107143, + "in": -1.0333333, + "out": 1.0333333, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,10,0,0" + }, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,100", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Range", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "0.48515,0.48121,0.28821,1", + "ConstantB": "0.21932,0.2432,0.28218,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "3,4,0,0" + }, + "MaxParticles": 5000, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,30", + "frames": [ + { + "x": 0, + "y": 0.0035714286, + "in": -11.230768, + "out": 11.230768, + "mode": "Mirrored" + }, + { + "x": 0.16009852, + "y": 0.85714287, + "in": -0.5348841, + "out": 0.5348841, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,30,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "World", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,200,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Tint": "1,1,1,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "0c8943ad-b33f-4457-9498-2953412cac44", + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.91, + "BlurSpacing": 0.73, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 1, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "particles/smoke/smoke001.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "262cfc92-01bf-435f-ad12-c3a2dd597221", + "Burst": 16, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 19.39, + "ConeFar": 23.679735, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "cf9349ce-8ca4-4590-9b8b-122fd0feb73f", + "Flags": 0, + "Name": "Spark", + "Enabled": true, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "fd0fb7a5-7b63-48be-8839-1a6ca8aefb9a", + "__version": 1, + "Alpha": 1, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 32, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,-800", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "0.93564,0.35758,0.19454,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.06,0.13,0,0" + }, + "MaxParticles": 5000, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.5, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "World", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,0,0,0" + }, + "Stretch": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,0,0,0" + }, + "TimeScale": 1, + "Tint": "1,1,1,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "21b3eba8-2a7f-4ed6-8ec9-60ebd08f1ab2", + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.91, + "BlurSpacing": 0.73, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 0.99, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/shapes/spark2.vtex" + }, + { + "__type": "Sandbox.ParticleSphereEmitter", + "__guid": "4edb8c38-abb0-4cef-8809-c3759565c72f", + "Burst": 4, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 1, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Radius": 0, + "Rate": 0, + "RateOverDistance": 0, + "Velocity": 0 + } + ], + "Children": [] + } + ] + } + ], + "__variables": [], + "__properties": { + "NetworkInterpolation": true, + "TimeScale": 1, + "WantsSystemScene": true, + "Metadata": {}, + "NavMesh": { + "Enabled": false, + "IncludeStaticBodies": true, + "IncludeKeyframedBodies": true, + "EditorAutoUpdate": true, + "AgentHeight": 64, + "AgentRadius": 16, + "AgentStepSize": 18, + "AgentMaxSlope": 40, + "ExcludedBodies": "", + "IncludedBodies": "" + } + } + }, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "ResourceVersion": 1, + "__references": [ + "facepunch.9mm_bullet#28861", + "facepunch.smoke001#45285", + "garry.impact_default#59708" + ], + "__version": 1 +} \ No newline at end of file diff --git a/Assets/prefabs/citizen_enemy.prefab b/Assets/prefabs/citizen_enemy.prefab new file mode 100644 index 0000000..0d0a9b7 --- /dev/null +++ b/Assets/prefabs/citizen_enemy.prefab @@ -0,0 +1,308 @@ +{ + "RootObject": { + "__guid": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "__version": 1, + "Flags": 0, + "Name": "citizen_enemy", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 1, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.NavMeshAgent", + "__guid": "dae8d611-15ad-4020-b1ab-c13b66ff07e9", + "__enabled": true, + "Acceleration": 520, + "AutoTraverseLinks": true, + "Height": 90.799995, + "MaxSpeed": 400, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Radius": 16, + "Separation": 0.22, + "UpdatePosition": true, + "UpdateRotation": true + }, + { + "__type": "Enemy", + "__guid": "f1949fb9-f84d-44f2-b7e1-d964942ced50", + "__enabled": true, + "agent": { + "_type": "component", + "component_id": "dae8d611-15ad-4020-b1ab-c13b66ff07e9", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "NavMeshAgent" + }, + "AnimationHelper": { + "_type": "component", + "component_id": "984e8c33-bf4a-4058-8cba-2da8bbc75f75", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "CitizenAnimationHelper" + }, + "AttackCooldown": 1, + "AttackRadius": 110, + "bloodParticle": { + "_type": "gameobject", + "prefab": "prefabs/impacts/impact.flesh.mist.prefab" + }, + "CurrentState": "Idle", + "DetectionRadius": 600, + "Health": 100, + "HitSound": { + "_type": "component", + "component_id": "88969834-8bec-4a74-8b16-c258c0377501", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SoundPointComponent" + }, + "MaxSpeed": 400, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RagdollController": { + "_type": "component", + "component_id": "16b8ed44-1abd-4f32-bf92-2bc21b785bc0", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "RagdollController" + }, + "renderer": { + "_type": "component", + "component_id": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SkinnedModelRenderer" + } + }, + { + "__type": "Sandbox.SkinnedModelRenderer", + "__guid": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "__enabled": true, + "AnimationGraph": null, + "BodyGroups": 341, + "BoneMergeTarget": null, + "CreateAttachments": false, + "CreateBoneObjects": false, + "MaterialGroup": null, + "MaterialOverride": "models/terryisdead/citizen_skin04.vmat", + "Model": "models/terryisdead/citizen_terryisdead.vmdl", + "Morphs": {}, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Parameters": { + "bools": {}, + "ints": {}, + "floats": {}, + "vectors": {}, + "rotations": {} + }, + "PlaybackRate": 1, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Sequence": { + "Name": null, + "Looping": true, + "Blending": false + }, + "Tint": "1,1,1,1", + "UseAnimGraph": true + }, + { + "__type": "Sandbox.Citizen.CitizenAnimationHelper", + "__guid": "984e8c33-bf4a-4058-8cba-2da8bbc75f75", + "__enabled": true, + "BodyWeight": 1, + "EyeSource": null, + "EyesWeight": 1, + "HeadWeight": 1, + "Height": null, + "IkLeftFoot": null, + "IkLeftHand": null, + "IkRightFoot": null, + "IkRightHand": null, + "LookAt": null, + "LookAtEnabled": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Target": { + "_type": "component", + "component_id": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SkinnedModelRenderer" + } + }, + { + "__type": "Sandbox.ModelHitboxes", + "__guid": "63936f84-7057-4c17-bf2a-27702ca5258c", + "__enabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Renderer": { + "_type": "component", + "component_id": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SkinnedModelRenderer" + }, + "Target": { + "_type": "gameobject", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0" + } + }, + { + "__type": "Sandbox.ModelPhysics", + "__guid": "c3b90741-9d94-4b5e-baa4-6b30b3b107d3", + "__enabled": false, + "Locking": { + "X": false, + "Y": false, + "Z": false, + "Pitch": false, + "Yaw": false, + "Roll": false + }, + "Model": "models/terryisdead/citizen_terryisdead.vmdl", + "MotionEnabled": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Renderer": { + "_type": "component", + "component_id": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SkinnedModelRenderer" + }, + "RigidbodyFlags": 0 + }, + { + "__type": "RagdollController", + "__guid": "16b8ed44-1abd-4f32-bf92-2bc21b785bc0", + "__enabled": true, + "bodyPhysics": { + "_type": "component", + "component_id": "c3b90741-9d94-4b5e-baa4-6b30b3b107d3", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "ModelPhysics" + }, + "bodyRenderer": { + "_type": "component", + "component_id": "981fee12-feca-4cff-b1fe-32b783e1a1dc", + "go": "ede7b66f-b9b2-4524-9933-4c2919ff6ae0", + "component_type": "SkinnedModelRenderer" + }, + "isLocked": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null + }, + { + "__type": "Sandbox.SoundPointComponent", + "__guid": "88969834-8bec-4a74-8b16-c258c0377501", + "__enabled": true, + "Distance": 512, + "DistanceAttenuation": false, + "DistanceAttenuationOverride": false, + "Falloff": [ + { + "x": 0, + "y": 1, + "in": 3.1415927, + "out": -3.1415927, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Force2d": false, + "MaxRepeatTime": 1, + "MinRepeatTime": 1, + "Occlusion": false, + "OcclusionOverride": false, + "OcclusionRadius": 32, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Pitch": 1, + "PlayOnStart": false, + "ReflectionOverride": false, + "Reflections": false, + "Repeat": false, + "SoundEvent": "sounds/hit_sound.sound", + "SoundOverride": false, + "StopOnNew": true, + "TargetMixer": { + "Name": "unknown", + "Id": "00000000-0000-0000-0000-000000000000" + }, + "Volume": 1 + } + ], + "Children": [], + "__properties": { + "NetworkInterpolation": true, + "TimeScale": 1, + "WantsSystemScene": true, + "Metadata": {}, + "NavMesh": { + "Enabled": false, + "IncludeStaticBodies": true, + "IncludeKeyframedBodies": true, + "EditorAutoUpdate": true, + "AgentHeight": 64, + "AgentRadius": 16, + "AgentStepSize": 18, + "AgentMaxSlope": 40, + "ExcludedBodies": "", + "IncludedBodies": "" + } + }, + "__variables": [] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/prefabs/impacts/impact.flesh.mist.prefab b/Assets/prefabs/impacts/impact.flesh.mist.prefab new file mode 100644 index 0000000..0f8e24d --- /dev/null +++ b/Assets/prefabs/impacts/impact.flesh.mist.prefab @@ -0,0 +1,1140 @@ +{ + "RootObject": { + "__guid": "a51ae2ca-cd42-4848-b000-a4835b6891a4", + "__version": 1, + "Flags": 0, + "Name": "impact.flesh.mist", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "0aec79d8-e412-493a-b828-aaf83eab0d08", + "__version": 1, + "Flags": 0, + "Name": "impact.flesh.mist", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "aef4c9bc-023a-41bf-98d7-f4d03bc36af4", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.6", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.008928573, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.5119048, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 0.5, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 9, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,0", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-20,20", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-20,20", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,60", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.09033476, + "y": 0.37121212, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,60", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.08616188, + "y": 0.033333287, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.17101827, + "y": 0.21784222, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "20,200,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.07907,0.00588,0.00588,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "2e0aec60-dbed-41f6-b232-c97b4038af19", + "__enabled": true, + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 11.4, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 1.01, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particle/smoke1/smoke1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "470628df-d4d4-43e8-a169-6df4815137e1", + "__enabled": true, + "Burst": 9, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 5.5, + "ConeFar": 1, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "ff4bc5ba-e817-4bb4-9de8-c634c83b6a57", + "__version": 1, + "Flags": 0, + "Name": "blood.squirt", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "0.5,0.5,0.5", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "9b4e68c0-7ddc-48f7-a4f3-a6b34c288cf1", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.8", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.14583333, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.3,1,0,0" + }, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 7, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,50", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-30,60", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-30,60", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,30", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.014360313, + "y": 0.59429395, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.071801566, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,30", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.033942558, + "y": 0.20378795, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.061357703, + "y": 0.4602665, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.8211488, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2.5,3,0,0" + }, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "20,80,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.08372,0.00584,0.00584,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "3f09fd88-573b-4018-af05-2b52651e7e63", + "__enabled": true, + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 1.5, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "particles/water/watersplash-1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "0587e0b1-3e58-419d-9482-1e6afa7beb84", + "__enabled": true, + "Burst": 4, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 45, + "ConeFar": 0.4, + "ConeNear": 0.1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": true, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "aa0717ad-4a86-4ba5-9114-0b43ee817766", + "__version": 1, + "Flags": 0, + "Name": "blood droplets", + "Position": "5.807796,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "19864321-5e18-49f9-ba23-fba560522a88", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.5744048, + "y": 1, + "in": 0, + "out": 0.5000002, + "mode": "Linear" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": false, + "ApplyShape": true, + "Bounce": 0.03, + "Brightness": 1, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 0.1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,-600", + "ForceScale": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.4,2,0,0" + }, + "ForceSpace": "World", + "Friction": 3, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": -5, + "Scale": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.04464286, + "y": 0.5336879, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ], + "CurveB": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.05613577, + "y": 0.1128788, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.18276763, + "y": 0.4905695, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ], + "Constants": "0.3,0.6,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "125,350,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.02791,0.00247,0.00247,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "7af090f7-c5d8-4f76-a152-a9a2a0c345b2", + "__enabled": true, + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 1, + "BlurOpacity": 1, + "BlurSpacing": 0.52, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": true, + "MotionBlur": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 0.8, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particle/particle_modulate_01.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "417830d0-a9d4-47a7-b071-614ebbc2af16", + "__enabled": true, + "Burst": 12, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 70, + "ConeFar": 2, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + } + ] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [ + "facepunch.impactfleshmist#88476", + "facepunch.impactgeneric#88477" + ], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/prefabs/impacts/impact.glass.prefab b/Assets/prefabs/impacts/impact.glass.prefab new file mode 100644 index 0000000..f0f2dda --- /dev/null +++ b/Assets/prefabs/impacts/impact.glass.prefab @@ -0,0 +1,1500 @@ +{ + "RootObject": { + "__guid": "123dec39-c053-4795-9395-1a693bd48d98", + "__version": 1, + "Flags": 0, + "Name": "impact.glass", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "3998060a-85fb-40d1-b3cf-74afecfedaf6", + "__version": 1, + "Flags": 0, + "Name": "impact.glass.chips", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "8478267c-56c2-4189-9951-c85cec920608", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.5029762, + "y": 1, + "in": 0, + "out": 0.5000002, + "mode": "Linear" + }, + { + "x": 0.6979167, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": false, + "ApplyShape": true, + "Bounce": 0.04, + "Brightness": 1, + "Bumpiness": 0, + "Collision": true, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 0.1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "0,0,-800", + "ForceScale": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.4,2,0,0" + }, + "ForceSpace": "World", + "Friction": 50, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": -5, + "Scale": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.04464286, + "y": 0.5336879, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ], + "CurveB": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.05613577, + "y": 0.1128788, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.18276763, + "y": 0.4905695, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ], + "Constants": "0.15,0.3,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,4,0,0" + }, + "SequenceSpeed": 0, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "40,150,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.54419,0.54419,0.54419,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "7e0edd5a-9648-4645-b0af-f683e1e0d0dc", + "__enabled": true, + "Additive": false, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/impact/glass_chips.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "cfcda030-b958-47b4-8927-f3916633dd19", + "__enabled": true, + "Burst": 8, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 23.5, + "ConeFar": 25, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "0310cc34-61d4-416e-9ebe-83d988d2eb36", + "__version": 1, + "Flags": 0, + "Name": "impact.generic.smoke", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "f2824fed-4f46-444c-ba74-f79c0e621e76", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.04", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.008928573, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.6904762, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 0.5, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 9, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,0", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,25", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.017227715, + "y": 0.43899098, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,25", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.08616188, + "y": 0.033333287, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.17101827, + "y": 0.21784222, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "100,200,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,1,1,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "87c2f664-38ca-43e3-b8ad-3e60f5fd2bd6", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 5.17, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/smoke1/smoke1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "3c8f00ee-8ce3-4239-9ff6-b397775a16ab", + "__enabled": true, + "Burst": 4, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 5.5, + "ConeFar": 1, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "7963b624-5a23-4df3-8f53-814d49ccb6e8", + "__version": 1, + "Flags": 0, + "Name": "impact.generic.smokering", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "0.5,0.5,0.5", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "c0f0648d-3234-4ac9-a08d-3d96307d0621", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.1", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.020833334, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.3,1,0,0" + }, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 7, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,50", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.014360313, + "y": 0.59429395, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.071801566, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.033942558, + "y": 0.20378795, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.061357703, + "y": 0.4602665, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.8211488, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "400,450,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.38605,0.38605,0.38605,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "0cbc17bc-0e8f-434e-bb1f-85244690ca31", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 4.96, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/smoke1/smoke1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "eacec9de-71e5-4ad2-82c1-6ebd393251ed", + "__enabled": true, + "Burst": 25, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 85, + "ConeFar": 0.2, + "ConeNear": 0.1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": true, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "e23b9137-56d9-446e-8ff6-90e78f40ef8c", + "__version": 1, + "Flags": 0, + "Name": "impact.dust", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "37662813-58a0-4505-b8d9-ec0e91b722ce", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.5", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.008928573, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.061011903, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 0.5, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,0", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "60,120,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.87907,0.87907,0.87907,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "a0bb7df1-5ab9-4180-b144-39dca1d010d9", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 5.17, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/particle_debris_02b.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "164af745-55dd-4957-80e1-943b2f9529b4", + "__enabled": true, + "Burst": 2, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 5.5, + "ConeFar": 1, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + } + ] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/prefabs/impacts/impact.metal.prefab b/Assets/prefabs/impacts/impact.metal.prefab new file mode 100644 index 0000000..7c98ebe --- /dev/null +++ b/Assets/prefabs/impacts/impact.metal.prefab @@ -0,0 +1,1163 @@ +{ + "RootObject": { + "__guid": "7cf5b1b6-f794-4909-8cf4-b2dab858f2c1", + "__version": 1, + "Flags": 0, + "Name": "impact.metal", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "2,2,2", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "1f622947-8dcb-4e73-be93-62d1496effd4", + "__version": 1, + "Flags": 0, + "Name": "impact.generic.smokering", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "0.5,0.5,0.5", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "b0ffaf00-991d-49f6-a72a-d70ccb2f3721", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.1", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.020833334, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.3,1,0,0" + }, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 7, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,50", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,15", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.014360313, + "y": 0.59429395, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.071801566, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,15", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.033942558, + "y": 0.20378795, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.061357703, + "y": 0.4602665, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.8211488, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "400,450,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.46977,0.46977,0.46977,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "e3e53470-e416-452f-b1ee-92d90d0dc7ee", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 4.96, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/smoke1/smoke1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "a2770794-223b-4997-8083-4d1d59e87a24", + "__enabled": true, + "Burst": 25, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 85, + "ConeFar": 0.4999999, + "ConeNear": 0.1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": true, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "58435d3d-619e-477c-9c0c-225f64cc3137", + "__version": 1, + "Flags": 0, + "Name": "impact.smoke", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "963a159a-23c0-489f-b617-7477fec47425", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.07", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.008928573, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.6904762, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 0.5, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 9, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "5,0,0", + "ForceScale": 3, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "2,3,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.4986945, + "y": 0.53409094, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangey": "-10,10", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.49608356, + "y": 0.4659091, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Constants": "-5,5,0,0" + }, + "Scale": { + "Type": "CurveRange", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,20", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0.4615381, + "out": -0.4615381, + "mode": "Mirrored" + }, + { + "x": 0.017227715, + "y": 0.43899098, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.57310706, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "CurveB": { + "rangey": "0,20", + "frames": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.08616188, + "y": 0.033333287, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.16579634, + "y": 0.3466301, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Constants": "5,15,0,0" + }, + "SequenceId": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,6,0,0" + }, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "50,160,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.50233,0.50233,0.50233,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "74b1c0dc-308d-4f36-9036-579de06a53fc", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 5.17, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": false, + "Lighting": true, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": true, + "SortMode": "Unsorted", + "Texture": "materials/particle/smoke1/smoke1.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "49d5c88c-d747-43bd-ade7-702acb3fe31d", + "__enabled": true, + "Burst": 7, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 5.5, + "ConeFar": 1, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + }, + { + "__guid": "7abf6424-62f6-482d-aecb-475709ed4403", + "__version": 1, + "Flags": 0, + "Name": "impact.sparks", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "c05ea2fb-af05-4783-be8b-655ae90cc62c", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": false, + "ApplyShape": false, + "Bounce": 1, + "Brightness": 2, + "Bumpiness": 0, + "Collision": true, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 1, + "DieOnCollisionChance": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0,5,0,0" + }, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "0,0,-900", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "0.3,1,0,0" + }, + "MaxParticles": 100, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": 0, + "Scale": 1, + "SequenceId": 0, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "World", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": [ + { + "x": 0.5, + "y": 0.5, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Constants": "200,500,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,0.75814,0.51628,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "69fda90c-d9bb-4453-92b7-0ffa5a01cddf", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 1, + "BlurOpacity": 1, + "BlurSpacing": 0.2, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": true, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 0.117999405, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particle/particle_flares/particle_flare_004b_mod.vtex" + }, + { + "__type": "Sandbox.ParticleTrailRenderer", + "__guid": "c97065fd-80c0-40a2-b3cb-9e5f10197fdc", + "__enabled": true, + "BlendMode": "Lighten", + "CastShadows": false, + "Color": { + "blend": "Linear", + "color": [ + { + "t": 0, + "c": "1,0.35,0,1" + }, + { + "t": 0.3888889, + "c": "1,0.56667,0,1" + }, + { + "t": 0.68162394, + "c": "0.98333,1,0,1" + }, + { + "t": 0.99572647, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "LifeTime": 0.5, + "MaxPoints": 12, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "PointDistance": 2, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": true, + "AfterUILayer": false + }, + "ScaleFromParticle": false, + "Texturing": { + "Texture": "materials/particle/particle_flares/particle_flare_004b_mod.vtex", + "WorldSpace": true, + "UnitsPerTexture": 10, + "Scale": 1, + "Offset": 0, + "Scroll": 0 + }, + "TintFromParticle": false, + "Width": { + "rangey": "0,0.1", + "frames": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.5401786, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + } + ] + }, + "Wireframe": false + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "cefd9be2-fdc8-4d27-be0c-dfff49b68e93", + "__enabled": true, + "Burst": 8, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 30, + "ConeFar": 10, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 3, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + } + ], + "__properties": { + "NetworkInterpolation": true, + "TimeScale": 1, + "WantsSystemScene": true, + "Metadata": {}, + "NavMesh": { + "Enabled": false, + "IncludeStaticBodies": true, + "IncludeKeyframedBodies": true, + "EditorAutoUpdate": true, + "AgentHeight": 64, + "AgentRadius": 16, + "AgentStepSize": 18, + "AgentMaxSlope": 40, + "ExcludedBodies": "", + "IncludedBodies": "" + } + }, + "__variables": [] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [ + "facepunch.impactgeneric#88477", + "facepunch.impactmetal#88479" + ], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/prefabs/impacts/rifle_muzzleflash.prefab b/Assets/prefabs/impacts/rifle_muzzleflash.prefab new file mode 100644 index 0000000..91aedee --- /dev/null +++ b/Assets/prefabs/impacts/rifle_muzzleflash.prefab @@ -0,0 +1,1443 @@ +{ + "RootObject": { + "__guid": "8b9fac1d-7c52-4e00-8a5e-7610bf5e2f96", + "__version": 1, + "Flags": 0, + "Name": "rifle_muzzleflash", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "f795c884-4d70-4990-b909-4070558fb334", + "__version": 1, + "Flags": 0, + "Name": "Core", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "d0dc3e93-47c9-46db-a378-ebef283c9bc5", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0.7,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 20, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,0", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.0021367522, + "c": "1,0.51628,0.25581,1" + }, + { + "t": 1, + "c": "1,0.6,0,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,0.60698,0.39535,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": 0.1, + "MaxParticles": 1, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 3, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "3,6,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.5, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": 0, + "Stretch": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,0,0,0" + }, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,0.86519,0.7814,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleBoxEmitter", + "__guid": "3fddff19-7ab9-4345-af80-c25f779ad954", + "__enabled": true, + "Burst": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 0.02, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 796.51, + "RateOverDistance": 0, + "Size": "0,0,0" + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "b178ac83-a024-41a7-9891-c38c8ef1a1a4", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 20.29, + "FaceVelocity": false, + "FogStrength": 0.54, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": true, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/smoke/render/smokeloop_g_1.vtex" + } + ], + "Children": [] + }, + { + "__guid": "67738e7a-5373-4cef-a621-3cdfa857f9cc", + "__version": 1, + "Flags": 0, + "Name": "Base", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "684bd9c5-4e01-45d9-b8a9-ec6329d3e35c", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,4,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 20, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,0", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Gradient", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.0021367522, + "c": "1,0.51628,0.25581,1" + }, + { + "t": 1, + "c": "1,0.6,0,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": 0.1, + "MaxParticles": 1, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 3, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "3,6,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.5, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": 0, + "Stretch": 0.3, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,0.46938,0.13953,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleBoxEmitter", + "__guid": "b60125e6-4a2f-4367-9cfb-a052f858d0ac", + "__enabled": true, + "Burst": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 0.02, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 796.51, + "RateOverDistance": 0, + "Size": "0,0,0" + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "8044a645-571c-4ef9-8d9f-c45c813d1942", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 20.29, + "FaceVelocity": false, + "FogStrength": 0.54, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/smoke/render/smokeloop_i_0.vtex" + } + ], + "Children": [] + }, + { + "__guid": "ad02c6d3-a81b-4951-b063-e9ed82d31264", + "__version": 1, + "Flags": 0, + "Name": "Muzzlebreak_Flares", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "c812339f-1c62-4a12-b53c-b5f891487f4f", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,4,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 20, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,0", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Gradient", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.0021367522, + "c": "1,0.51628,0.25581,1" + }, + { + "t": 1, + "c": "1,0.6,0,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": 0.1, + "MaxParticles": 1, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 3, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,2,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.5, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": 0, + "Stretch": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,5,0,0" + }, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,0.46938,0.13953,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleBoxEmitter", + "__guid": "c450c42e-567c-424f-a90b-01b07fe7819d", + "__enabled": true, + "Burst": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 0.02, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 796.51, + "RateOverDistance": 0, + "Size": "0,0,0" + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "f26fbd90-66a6-4e25-b937-f20d034cc3cc", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 20.29, + "FaceVelocity": false, + "FogStrength": 0.54, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": true, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/spark_white.vtex" + } + ], + "Children": [] + }, + { + "__guid": "038fa82a-d2d9-49b9-a458-1db2f9a956f3", + "__version": 1, + "Flags": 0, + "Name": "Flare", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "d5987623-7150-4fd1-a89c-b664e41e256a", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0.25,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 1, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 0, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": false, + "ForceDirection": "0,0,0", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.0021367522, + "c": "1,0.51628,0.25581,1" + }, + { + "t": 1, + "c": "1,0.6,0,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": 0.1, + "MaxParticles": 1, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 3, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "12,19,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": 0, + "Stretch": { + "Type": "Range", + "Evaluation": "Frame", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,0,0,0" + }, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,0.53767,0.0093,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleBoxEmitter", + "__guid": "cbdd085a-e2ca-443a-92bb-e41a1a999d47", + "__enabled": true, + "Burst": 1, + "Delay": 0, + "DestroyOnEnd": false, + "Duration": 0.02, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 796.51, + "RateOverDistance": 0, + "Size": "0,0,0" + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "6a558b98-00f7-4395-8075-61e7e4f269de", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.5, + "BlurOpacity": 0.5, + "BlurSpacing": 0.5, + "DepthFeather": 20.29, + "FaceVelocity": false, + "FogStrength": 0.54, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": true, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/light_flare/light_glow_01.vtex" + } + ], + "Children": [] + }, + { + "__guid": "fc31ca5a-a911-4ea1-ba99-6cbe83ce35aa", + "__version": 1, + "Flags": 0, + "Name": "Smoke", + "Position": "0,1.017172,0", + "Rotation": "0,-0.7071068,0,0.7071068", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "c482ab2b-71e3-425e-bfe0-56ff7c30a195", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 0, + "in": -4.0000024, + "out": 4.0000024, + "mode": "Mirrored" + }, + { + "x": 0.028068565, + "y": 0.64255315, + "in": -0.7624077, + "out": 0.7624077, + "mode": "Mirrored" + }, + { + "x": 0.19791667, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": true, + "ApplyShape": true, + "Bounce": 1, + "Brightness": { + "Type": "Range", + "Evaluation": "Life", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0.15,0,0,0" + }, + "Bumpiness": 0, + "Collision": false, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 4, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "0,0,65", + "ForceScale": 6, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Range", + "Evaluation": "Life", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "0.88837,0.72833,0.54542,1", + "ConstantB": "0.87907,0.30767,0,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,2,0,0" + }, + "MaxParticles": 50, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,30", + "frames": [ + { + "x": 0.007440476, + "y": 0, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 0.08630952, + "y": 0.23909418, + "in": 0, + "out": 0, + "mode": "Linear" + }, + { + "x": 1, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "CurveB": [ + { + "x": 0, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.6307947, + "y": 0.79924244, + "in": 0.055555623, + "out": -0.055555623, + "mode": "Mirrored" + } + ], + "Constants": "20,60,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 0.4, + "SequenceTime": 1, + "SheetSequence": true, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "4,10,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "1,1,1,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "2be3e2ce-4e83-47ee-894e-6821682ff6b6", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 0.05, + "BlurOpacity": 0.91, + "BlurSpacing": 0.73, + "DepthFeather": 34.61, + "FaceVelocity": false, + "FogStrength": 0.57, + "LeadingTrail": false, + "Lighting": false, + "MotionBlur": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 339.53, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/smoke/render/smokeloop_i_1.vtex" + }, + { + "__type": "Sandbox.ParticleBoxEmitter", + "__guid": "9896fbe6-176f-4a29-8211-2787c4d2a209", + "__enabled": true, + "Burst": 4, + "Delay": 0, + "DestroyOnEnd": true, + "Duration": 0.1, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": false, + "Rate": 1, + "RateOverDistance": 0, + "Size": "1,1,1" + } + ], + "Children": [] + }, + { + "__guid": "9c15c3f5-5f0a-454c-9f1e-c33a86709ae9", + "__version": 1, + "Flags": 0, + "Name": "Sparks", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "particles", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ParticleEffect", + "__guid": "ad4fc972-ee79-49be-a189-05079035a459", + "__enabled": true, + "__version": 1, + "Alpha": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.0997024, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,0,0,0" + }, + "ApplyAlpha": true, + "ApplyColor": true, + "ApplyRotation": false, + "ApplyShape": true, + "Bounce": 1, + "Brightness": 4, + "Bumpiness": 0, + "Collision": true, + "CollisionIgnore": null, + "CollisionPrefab": null, + "CollisionPrefabAlign": false, + "CollisionPrefabChance": 1, + "CollisionPrefabRotation": 0, + "CollisionRadius": 1, + "Damping": 1, + "DieOnCollisionChance": 0, + "FollowerPrefab": null, + "FollowerPrefabChance": 1, + "FollowerPrefabKill": true, + "Force": true, + "ForceDirection": "0,0,-20", + "ForceScale": 1, + "ForceSpace": "World", + "Friction": 1, + "Gradient": { + "Type": "Constant", + "Evaluation": "Particle", + "GradientA": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "GradientB": { + "blend": "Linear", + "color": [ + { + "t": 0.5, + "c": "1,1,1,1" + } + ], + "alpha": [] + }, + "ConstantA": "1,1,1,1", + "ConstantB": "1,1,1,1" + }, + "Lifetime": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,0.1,0,0" + }, + "MaxParticles": 10, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnParticleCreated": null, + "OnParticleDestroyed": null, + "OrbitalForce": { + "X": 0, + "Y": 0, + "Z": 0 + }, + "OrbitalPull": 0, + "PerParticleTimeScale": 1, + "Pitch": 0, + "PreWarm": 0, + "PushStrength": 0, + "Roll": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "0,360,0,0" + }, + "Scale": { + "Type": "Curve", + "Evaluation": "Life", + "CurveA": { + "rangey": "0,0.4", + "frames": [ + { + "x": 0, + "y": 0.60106385, + "in": -9.333329, + "out": 9.333329, + "mode": "Mirrored" + }, + { + "x": 0.05408456, + "y": 0.94414896, + "in": 0.11040629, + "out": -0.11040629, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 2.9152544, + "out": -2.9152544, + "mode": "Mirrored" + } + ] + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "1,0,0,0" + }, + "SequenceId": 0, + "SequenceSpeed": 1, + "SequenceTime": 1, + "SheetSequence": false, + "Space": "Local", + "StartDelay": 0, + "StartVelocity": { + "Type": "Range", + "Evaluation": "Particle", + "CurveA": { + "rangex": "0,0", + "rangey": "0,0" + }, + "CurveB": { + "rangex": "0,0", + "rangey": "0,0" + }, + "Constants": "100,200,0,0" + }, + "Stretch": 0, + "TimeScale": 1, + "Timing": "GameTime", + "Tint": "0.9814,0.3762,0,1", + "UsePrefabFeature": false, + "Yaw": 0 + }, + { + "__type": "Sandbox.ParticleSpriteRenderer", + "__guid": "ab50ad03-cc04-457a-99f0-fec6fdeb7a1b", + "__enabled": true, + "Additive": true, + "Alignment": "LookAtCamera", + "BlurAmount": 1, + "BlurOpacity": 0.74, + "BlurSpacing": 1, + "DepthFeather": 0, + "FaceVelocity": false, + "FogStrength": 1, + "LeadingTrail": true, + "Lighting": false, + "MotionBlur": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Opaque": false, + "Pivot": "0.5,0.5", + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RotationOffset": 0, + "Scale": 2, + "Shadows": false, + "SortMode": "Unsorted", + "Texture": "materials/particles/particle_glow_05.vtex" + }, + { + "__type": "Sandbox.ParticleConeEmitter", + "__guid": "63caff82-11a0-4da5-8440-d822ab785963", + "__enabled": true, + "Burst": 2, + "CenterBias": 0, + "CenterBiasVelocity": 0, + "ConeAngle": 45, + "ConeFar": 20, + "ConeNear": 1, + "Delay": 0, + "DestroyOnEnd": true, + "Duration": 0.02, + "InVolume": false, + "Loop": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnEdge": true, + "Rate": 0, + "RateOverDistance": 0, + "VelocityMultiplier": 1, + "VelocityRandom": 0 + } + ], + "Children": [] + } + ] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [ + "eddiessons.spray#84086", + "facepunch.rifle_muzzleflash#76090", + "facepunch.suppressed_muzzleflash#76273" + ], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/prefabs/pistol_1.prefab b/Assets/prefabs/pistol_1.prefab new file mode 100644 index 0000000..fbe415d --- /dev/null +++ b/Assets/prefabs/pistol_1.prefab @@ -0,0 +1,385 @@ +{ + "RootObject": { + "__guid": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb", + "__version": 1, + "Flags": 0, + "Name": "pistol_1", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "light_spot,light,light_point,weapon", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": false, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.SkinnedModelRenderer", + "__guid": "6017d24d-39d0-4acf-bf9f-010c345fd13d", + "__enabled": true, + "AnimationGraph": "animgraphs/pistol.vanmgrph", + "BodyGroups": 18446744073709551615, + "BoneMergeTarget": null, + "CreateAttachments": false, + "CreateBoneObjects": false, + "MaterialGroup": null, + "MaterialOverride": null, + "Model": "pistol.vmdl", + "Morphs": {}, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Parameters": { + "bools": { + "Fire": true + }, + "ints": {}, + "floats": {}, + "vectors": {}, + "rotations": {} + }, + "PlaybackRate": 1, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Sequence": { + "Name": null, + "Looping": true, + "Blending": false + }, + "Tint": "1,1,1,1", + "UseAnimGraph": true + }, + { + "__type": "Sandbox.Weapons.Weapon", + "__guid": "c8d294ad-32d0-413a-a5cf-c51acaa19920", + "__enabled": true, + "bloodParticle": { + "_type": "gameobject", + "prefab": "prefabs/impacts/impact.flesh.mist.prefab" + }, + "BulletOut": { + "_type": "gameobject", + "go": "d81748e9-bc3d-4d68-97b5-5602bf5e0e15" + }, + "GunRenderer": { + "_type": "component", + "component_id": "6017d24d-39d0-4acf-bf9f-010c345fd13d", + "go": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb", + "component_type": "SkinnedModelRenderer" + }, + "ImpactDecal": null, + "ImpactSound": null, + "MuzzleLight": { + "_type": "gameobject", + "go": "eda01dbe-7e56-4e66-af99-673e197e7dc0" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "particlePrefab": { + "_type": "gameobject", + "prefab": "prefabs/impacts/impact.metal.prefab" + } + }, + { + "__type": "Sandbox.SoundPointComponent", + "__guid": "be95c906-5f2f-4239-8fd6-a42a148dea6e", + "__enabled": true, + "Distance": 2219, + "DistanceAttenuation": true, + "DistanceAttenuationOverride": true, + "Falloff": [ + { + "x": 0, + "y": 1, + "in": 3.1415927, + "out": -3.1415927, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "Force2d": false, + "MaxRepeatTime": 1, + "MinRepeatTime": 1, + "Occlusion": false, + "OcclusionOverride": false, + "OcclusionRadius": 32, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Pitch": 1, + "PlayOnStart": false, + "ReflectionOverride": false, + "Reflections": false, + "Repeat": false, + "SoundEvent": "sounds/shoot_sound_1.sound", + "SoundOverride": false, + "StopOnNew": true, + "TargetMixer": { + "Name": "game", + "Id": "fa65adf3-a336-4d2b-9e2f-37f15349175a" + }, + "Volume": 1 + } + ], + "Children": [ + { + "__guid": "eda01dbe-7e56-4e66-af99-673e197e7dc0", + "__version": 1, + "Flags": 0, + "Name": "MuzzleLight", + "Position": "19.65036,0.000002036104,11.18876", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": false, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.PointLight", + "__guid": "1e1e54b4-ebf1-4211-9ca9-0eaa37f7bf7e", + "__enabled": true, + "Attenuation": 2.56, + "FogMode": "Enabled", + "FogStrength": 0.19, + "LightColor": "0,0.11667,1,1", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Radius": 160.99942, + "Shadows": true + } + ], + "Children": [] + }, + { + "__guid": "d81748e9-bc3d-4d68-97b5-5602bf5e0e15", + "__version": 1, + "Flags": 0, + "Name": "BulletOut", + "Position": "11.14736,-0.2659489,5.71905", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [] + }, + { + "__guid": "47bb3ba1-b0de-4af4-b639-235a5ad2c312", + "__version": 1, + "Flags": 0, + "Name": "Laser2", + "Position": "11.14736,-0.2659489,3.71905", + "Rotation": "0,0,0,1", + "Scale": "1,0.1,0.1", + "Tags": "", + "Enabled": false, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.SkinnedModelRenderer", + "__guid": "862e0738-e57f-456a-b0c8-ff03a165faf9", + "__enabled": true, + "AnimationGraph": null, + "BodyGroups": 18446744073709551615, + "BoneMergeTarget": null, + "CreateAttachments": false, + "CreateBoneObjects": false, + "MaterialGroup": null, + "MaterialOverride": "materials/pistol/glow_2.vmat", + "Model": "lasermesh.vmdl", + "Morphs": {}, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Parameters": { + "bools": {}, + "ints": {}, + "floats": {}, + "vectors": {}, + "rotations": {} + }, + "PlaybackRate": 1, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Sequence": { + "Name": null, + "Looping": true, + "Blending": false + }, + "Tint": "1,1,1,1", + "UseAnimGraph": true + } + ], + "Children": [] + }, + { + "__guid": "a9d8c3d0-cbcb-4ebe-994c-5f4c36f08996", + "__version": 1, + "Flags": 0, + "Name": "Laser", + "Position": "11.14736,-0.2659489,5.71905", + "Rotation": "0,0,0,1", + "Scale": "1,0.1,0.1", + "Tags": "", + "Enabled": false, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.SkinnedModelRenderer", + "__guid": "e1b93001-f96d-474d-bd6f-aaa2acb0d33e", + "__enabled": true, + "AnimationGraph": null, + "BodyGroups": 18446744073709551615, + "BoneMergeTarget": null, + "CreateAttachments": false, + "CreateBoneObjects": false, + "MaterialGroup": null, + "MaterialOverride": "materials/pistol/glow_2.vmat", + "Model": "lasermesh.vmdl", + "Morphs": {}, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Parameters": { + "bools": {}, + "ints": {}, + "floats": {}, + "vectors": {}, + "rotations": {} + }, + "PlaybackRate": 1, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Sequence": { + "Name": null, + "Looping": true, + "Blending": false + }, + "Tint": "1,1,1,1", + "UseAnimGraph": true + } + ], + "Children": [] + }, + { + "__guid": "0e9f41d3-8000-4c3c-9cdd-076056da9d0a", + "__version": 1, + "Flags": 0, + "Name": "Light", + "Position": "11.08827,0,3.583341", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.SpotLight", + "__guid": "3803bdb5-aa92-46f7-91a6-1dfad9549cf4", + "__enabled": true, + "Attenuation": 1.8, + "ConeInner": 28.06, + "ConeOuter": 33.99, + "Cookie": null, + "FogMode": "Enabled", + "FogStrength": 0.19, + "LightColor": "0.91373,0.98039,1,1", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Radius": 500, + "Shadows": true + } + ], + "Children": [] + } + ], + "__properties": { + "NetworkInterpolation": false, + "TimeScale": 1, + "WantsSystemScene": true, + "Metadata": {}, + "NavMesh": { + "Enabled": false, + "IncludeStaticBodies": true, + "IncludeKeyframedBodies": true, + "EditorAutoUpdate": true, + "AgentHeight": 64, + "AgentRadius": 16, + "AgentStepSize": 18, + "AgentMaxSlope": 40, + "ExcludedBodies": "", + "IncludedBodies": "" + } + }, + "__variables": [] + }, + "ResourceVersion": 2, + "ShowInMenu": false, + "MenuPath": null, + "MenuIcon": null, + "DontBreakAsTemplate": false, + "__references": [], + "__version": 2 +} \ No newline at end of file diff --git a/Assets/sounds/hit_sound.mp3 b/Assets/sounds/hit_sound.mp3 new file mode 100644 index 0000000..346ef9a --- /dev/null +++ b/Assets/sounds/hit_sound.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e360071075d59b08a621e51090365def1b1baa3460bccc938323ae0daffb05f +size 40807 diff --git a/Assets/sounds/hit_sound.sound b/Assets/sounds/hit_sound.sound new file mode 100644 index 0000000..a509660 --- /dev/null +++ b/Assets/sounds/hit_sound.sound @@ -0,0 +1,52 @@ +{ + "UI": false, + "Volume": "1", + "Pitch": "1", + "Decibels": 70, + "SelectionMode": "Random", + "Sounds": [ + "sounds/hit_sound.vsnd" + ], + "Occlusion": true, + "AirAbsorption": true, + "Transmission": true, + "OcclusionRadius": 64, + "DistanceAttenuation": true, + "Distance": 15000, + "Falloff": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": -1.8, + "mode": "Mirrored" + }, + { + "x": 0.05, + "y": 0.22, + "in": 3.5, + "out": -3.5, + "mode": "Mirrored" + }, + { + "x": 0.2, + "y": 0.04, + "in": 0.16, + "out": -0.16, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "DefaultMixer": { + "Name": "unknown", + "Id": "00000000-0000-0000-0000-000000000000" + }, + "__references": [], + "__version": 1 +} \ No newline at end of file diff --git a/Assets/sounds/shoot_sound_1.mp3 b/Assets/sounds/shoot_sound_1.mp3 new file mode 100644 index 0000000..287b720 --- /dev/null +++ b/Assets/sounds/shoot_sound_1.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:755d3b5339185859af2f19fc03e55c5b739c1f8ed22fb9376800c9c6782dd070 +size 40807 diff --git a/Assets/sounds/shoot_sound_1.sound b/Assets/sounds/shoot_sound_1.sound new file mode 100644 index 0000000..f916b7a --- /dev/null +++ b/Assets/sounds/shoot_sound_1.sound @@ -0,0 +1,52 @@ +{ + "UI": false, + "Volume": "1", + "Pitch": "1", + "Decibels": 70, + "SelectionMode": "Random", + "Sounds": [ + "sounds/shoot_sound_1.vsnd" + ], + "Occlusion": true, + "AirAbsorption": true, + "Transmission": true, + "OcclusionRadius": 64, + "DistanceAttenuation": true, + "Distance": 15000, + "Falloff": [ + { + "x": 0, + "y": 1, + "in": 0, + "out": -1.8, + "mode": "Mirrored" + }, + { + "x": 0.05, + "y": 0.22, + "in": 3.5, + "out": -3.5, + "mode": "Mirrored" + }, + { + "x": 0.2, + "y": 0.04, + "in": 0.16, + "out": -0.16, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ], + "DefaultMixer": { + "Name": "unknown", + "Id": "00000000-0000-0000-0000-000000000000" + }, + "__references": [], + "__version": 1 +} \ No newline at end of file diff --git a/Assets/textures/pistol/Fabric080_1K-PNG_Color.png b/Assets/textures/pistol/Fabric080_1K-PNG_Color.png new file mode 100644 index 0000000..68e6d34 --- /dev/null +++ b/Assets/textures/pistol/Fabric080_1K-PNG_Color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98b67cba4f94c308f58ef035d7fe9682a23748259e224b8b74dc08068597fe5a +size 1204941 diff --git a/Assets/textures/pistol/Fabric080_1K-PNG_NormalGL_norm.png b/Assets/textures/pistol/Fabric080_1K-PNG_NormalGL_norm.png new file mode 100644 index 0000000..badc2fd --- /dev/null +++ b/Assets/textures/pistol/Fabric080_1K-PNG_NormalGL_norm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac0e6fb1aa5bd1a70cf18d349bcc54bb751c28d7fbf34da8e1213ebe01112828 +size 951135 diff --git a/Assets/textures/pistol/Fabric080_1K-PNG_Roughness.png b/Assets/textures/pistol/Fabric080_1K-PNG_Roughness.png new file mode 100644 index 0000000..09d330c --- /dev/null +++ b/Assets/textures/pistol/Fabric080_1K-PNG_Roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e6c8973686f747c8e5b1f2b072c1454712d7f1d3d29db6a3f77f1abd828a07a +size 373452 diff --git a/Assets/textures/pistol/Metal055A_1K-PNG_Color.png b/Assets/textures/pistol/Metal055A_1K-PNG_Color.png new file mode 100644 index 0000000..0cf24e9 --- /dev/null +++ b/Assets/textures/pistol/Metal055A_1K-PNG_Color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2063fd8fb4edce1beff6ccfb47dacd184556d5927389254d9fa9a415f4093c1 +size 1056637 diff --git a/Assets/textures/pistol/Metal055A_1K-PNG_Metalness.png b/Assets/textures/pistol/Metal055A_1K-PNG_Metalness.png new file mode 100644 index 0000000..496eb9a --- /dev/null +++ b/Assets/textures/pistol/Metal055A_1K-PNG_Metalness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a184fc6fc7bf3b31df730dd252865ff4f89bb54ff9467b1e606ca68fec6fbc80 +size 72234 diff --git a/Assets/textures/pistol/Metal055A_1K-PNG_NormalGL_norm.png b/Assets/textures/pistol/Metal055A_1K-PNG_NormalGL_norm.png new file mode 100644 index 0000000..9ceaad8 --- /dev/null +++ b/Assets/textures/pistol/Metal055A_1K-PNG_NormalGL_norm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efbcc7b7a74c3139ec70f09f30ae884f836aa54e6e180981551bf90234f5106d +size 842999 diff --git a/Assets/textures/pistol/Metal055A_1K-PNG_Roughness.png b/Assets/textures/pistol/Metal055A_1K-PNG_Roughness.png new file mode 100644 index 0000000..36318eb --- /dev/null +++ b/Assets/textures/pistol/Metal055A_1K-PNG_Roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2f510b2bfb49f19797220c0bfbd119b8b6ae49085673a2c92e0f4a9fe0f520e +size 530533 diff --git a/Assets/textures/pistol/Plastic018A_1K-PNG_NormalDX_norm.png b/Assets/textures/pistol/Plastic018A_1K-PNG_NormalDX_norm.png new file mode 100644 index 0000000..c6bc066 --- /dev/null +++ b/Assets/textures/pistol/Plastic018A_1K-PNG_NormalDX_norm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d201185fa5db750281e2a8dc2b4d10ee6da671390b5690817bd841cb65c1765 +size 2004170 diff --git a/Assets/textures/pistol/Plastic018A_1K-PNG_Roughness.png b/Assets/textures/pistol/Plastic018A_1K-PNG_Roughness.png new file mode 100644 index 0000000..85df6b7 --- /dev/null +++ b/Assets/textures/pistol/Plastic018A_1K-PNG_Roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84882d5e796f6cadc59ea2d13516c0fda75b83d5b6e3a932a87cceb7298352d7 +size 643863 diff --git a/Code/AI/Enemy.cs b/Code/AI/Enemy.cs new file mode 100644 index 0000000..7ab9232 --- /dev/null +++ b/Code/AI/Enemy.cs @@ -0,0 +1,321 @@ +using Sandbox; +using Sandbox.Citizen; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +public sealed partial class Enemy : Component +{ + public enum EnemyState + { + Idle, + Chase, + Attack, + Patrol, + Death + } + + [Property, Sync] public int Health { get; set; } = 100; + [Property] public float MaxSpeed { get; set; } = 400; + + [Property] public NavMeshAgent agent; + [Property] public SkinnedModelRenderer renderer; + [Property] public CitizenAnimationHelper AnimationHelper; + + [Property, Sync] public EnemyState CurrentState { get; set; } = EnemyState.Idle; + [Property] public float DetectionRadius = 1000f; + [Property] public float AttackRadius = 80f; + [Property] public float AttackCooldown = 1f; + [Property] public RagdollController RagdollController; + [Property] public SoundPointComponent HitSound { get; set; } + [Property] public GameObject bloodParticle { get; set; } + + private TimeSince _timeSinceLastAttack; + private Dedugan _currentTarget; + private TimeSince _lastTargetCheck; + private const float TargetCheckInterval = 1.5f; + + private List _potentialTargets = new(); + private TimeSince _lastSearchRefresh; + private TimeSince _stateEnterTime; + + public event Action OnStateChanged; + + protected override void OnStart() + { + renderer.Set( "scale_height", 2f ); + _timeSinceLastAttack = 0; + _lastTargetCheck = 0; + RefreshPotentialTargets(); + SwitchState( EnemyState.Idle ); + + // if ( !Network.IsOwner ) return; + + if ( renderer is null ) + return; + + renderer.OnFootstepEvent += OnFootstepEvent; + } + + protected override void OnUpdate() + { + // Всегда проверяем ближайшую цель + if ( _lastTargetCheck > TargetCheckInterval && CurrentState != EnemyState.Death ) + { + FindClosestTarget(); + _lastTargetCheck = 0; + } + + switch ( CurrentState ) + { + case EnemyState.Idle: + UpdateIdleState(); + break; + case EnemyState.Chase: + UpdateChaseState(); + break; + case EnemyState.Attack: + UpdateAttackState(); + break; + case EnemyState.Patrol: + UpdatePatrolState(); + break; + case EnemyState.Death: + UpdateDeathState(); + break; + } + } + + private void SwitchState( EnemyState newState ) + { + if ( CurrentState == newState ) return; + if ( CurrentState == EnemyState.Death ) return; + + var previousState = CurrentState; + CurrentState = newState; + _stateEnterTime = 0; + + OnStateChanged?.Invoke( previousState, newState ); + + switch ( newState ) + { + case EnemyState.Idle: + agent.Stop(); + AnimationHelper.HoldType = CitizenAnimationHelper.HoldTypes.None; + AnimationHelper.WithVelocity( Vector3.Zero ); + renderer.Set( "scale_height", 2f ); + break; + case EnemyState.Chase: + agent.MaxSpeed = MaxSpeed; + AnimationHelper.HoldType = CitizenAnimationHelper.HoldTypes.Punch; + break; + case EnemyState.Patrol: + agent.MaxSpeed = MaxSpeed / 4; + break; + case EnemyState.Death: + EnterDeathState(); + break; + } + } + + private void RefreshPotentialTargets() + { + _potentialTargets.Clear(); + foreach ( var player in Scene.Components.GetAll() ) + { + if ( player.IsValid() && player.Health > 0 ) + { + _potentialTargets.Add( player ); + } + } + + _lastSearchRefresh = 0; + } + + private void FindClosestTarget() + { + // Обновляем список целей при необходимости + if ( _lastSearchRefresh > 1f ) RefreshPotentialTargets(); + + Dedugan closestTarget = null; + float closestDistance = float.MaxValue; + + foreach ( var target in _potentialTargets ) + { + if ( !target.IsValid() || target.Health <= 0 ) continue; + + float distance = Vector3.DistanceBetween( WorldPosition, target.WorldPosition ); + if ( distance <= DetectionRadius && distance < closestDistance ) + { + closestDistance = distance; + closestTarget = target; + } + else + { + _currentTarget = null; + } + } + + // Если нашли более близкую цель, переключаемся на нее + if ( closestTarget != null && closestTarget != _currentTarget ) + { + _currentTarget = closestTarget; + + // Если мы в состоянии атаки/погони и цель сменилась, перезапускаем движение + if ( CurrentState == EnemyState.Chase || CurrentState == EnemyState.Attack ) + { + agent.MoveTo( _currentTarget.WorldPosition ); + } + } + } + + private bool HasValidTarget() + { + return _currentTarget != null && + _currentTarget.IsValid() && + _currentTarget.Health > 0; + } + + private void UpdateIdleState() + { + if ( HasValidTarget() ) + { + Log.Info(_currentTarget); + SwitchState( EnemyState.Chase ); + return; + } + + if ( new Random().Next( 0, 100 ) > 90 ) + { + SwitchState( EnemyState.Patrol ); + } + + SwitchState( EnemyState.Patrol ); + + AnimationHelper.WithVelocity( Vector3.Zero ); + } + + private void UpdatePatrolState() + { + if ( HasValidTarget() ) + { + SwitchState( EnemyState.Chase ); + return; + } + + if ( agent.Velocity.Length <= 10 ) + { + agent.MoveTo( Scene.NavMesh.GetRandomPoint() ?? WorldPosition ); + } + + AnimationHelper.WithVelocity( agent.Velocity ); + } + + + private void UpdateChaseState() + { + if ( !HasValidTarget() ) + { + SwitchState( EnemyState.Idle ); + return; + } + + float distance = Vector3.DistanceBetween( _currentTarget.WorldPosition, WorldPosition ); + + if ( distance <= AttackRadius ) + { + SwitchState( EnemyState.Attack ); + return; + } + + if ( distance > DetectionRadius ) + { + SwitchState( EnemyState.Idle ); + return; + } + + agent.MoveTo( _currentTarget.WorldPosition ); + AnimationHelper.WithVelocity( agent.Velocity ); + } + + private void UpdateAttackState() + { + if ( !HasValidTarget() ) + { + SwitchState( EnemyState.Idle ); + return; + } + + float distance = Vector3.DistanceBetween( _currentTarget.WorldPosition, WorldPosition ); + + if ( distance > AttackRadius ) + { + SwitchState( EnemyState.Chase ); + return; + } + + agent.Stop(); + AnimationHelper.WithVelocity( Vector3.Zero ); + + if ( _timeSinceLastAttack >= AttackCooldown ) + { + var dir = _currentTarget.WorldPosition - WorldPosition; + renderer.Set( "b_attack", true ); + _timeSinceLastAttack = 0; + _currentTarget.ReportHit( dir, 1, 15 ); + CreateHitEffects( _currentTarget.WorldPosition + _currentTarget.WorldRotation.Up * 60, dir ); + } + } + + private void EnterDeathState() + { + agent.Stop(); + AnimationHelper.WithVelocity( Vector3.Zero ); + if ( RagdollController != null ) RagdollController.Enabled = true; + } + + private void UpdateDeathState() + { + // Логика состояния смерти + } + + public void Die() + { + SwitchState( EnemyState.Death ); + + DestroyAsync( GameObject, 5f ); + } + + [Rpc.Broadcast] + public void ReportHit( Vector3 dir, int boneIndex, int damage = 25 ) + { + renderer.Set( "hit", true ); + renderer.Set( "hit_bone", boneIndex ); + renderer.Set( "hit_direction", dir ); + renderer.Set( "hit_offset", dir ); + renderer.Set( "hit_strength", 5 ); + + Health -= damage; + if ( Health <= 0 ) + { + Die(); + } + } + + [Rpc.Broadcast] + private void CreateHitEffects( Vector3 position, Vector3 normal ) + { + if ( HitSound != null ) HitSound.StartSound(); + if ( bloodParticle != null ) + { + var rot = Rotation.LookAt( normal ); + DestroyAsync( bloodParticle.Clone( position, rot ), 0.5f ); + } + } + + async void DestroyAsync( GameObject go, float delay ) + { + await GameTask.DelaySeconds( delay ); + if ( go != null && go.IsValid() ) go.Destroy(); + } +} diff --git a/Code/Maze/Maze.cs b/Code/Maze/Maze.cs new file mode 100644 index 0000000..c2ca053 --- /dev/null +++ b/Code/Maze/Maze.cs @@ -0,0 +1,551 @@ +public sealed class Maze : Component +{ + [Property, Sync] public int Width { get; set; } = 10; + [Property, Sync] public int Height { get; set; } = 10; + [Property, Sync] public float WallHeight { get; set; } = 5f; + [Property, Sync] public float WallThickness { get; set; } = 5f; + [Property, Sync] public float CellSize { get; set; } = 200f; + [Property, Sync] public float PassThrougthPercent { get; set; } = 0.1f; + [Property] public int CenterClearRadius { get; set; } = 1; + [Property] public GameObject EnemyPrefab { get; set; } + + private GameObject _mazeWallsObject; + public Cell[,] Cells; + private List _walls = new(); + [Property] public GameObject Floor { get; set; } + [Property] public bool IsReady { get; set; } = false; + [Property] public Material WallMaterial { get; set; } // Добавлено свойство для материала + + private static readonly string WallModelPath = "models/dev/box.vmdl_c"; + + private Vector3 mazeOffset => + new Vector3( -(Width * CellSize) / 2 + CellSize / 2, -(Height * CellSize) / 2 + CellSize / 2, 0 ); + + [Property, Sync( SyncFlags.FromHost ), Change( "OnSeedChanged" )] + public int MazeSeed { get; set; } = -1; + + + void OnSeedChanged( int oldValue, int newValue ) + { + if ( newValue != oldValue ) + { + IsReady = false; + CreateMaze(); + } + } + + [Rpc.Broadcast] + public void RpcRequestMaze() + { + if ( Networking.IsHost ) + { + MazeSeed = Game.Random.Int( 0, 999999999 ); + } + } + + public async void CreateMaze() + { + Log.Info( $"CREATE MAZE {MazeSeed}" ); + ScaleFloor(); + ClearMaze(); + GenerateMaze(); + await Task.Delay( 10 ); + + BuildMazeOptimized(); + + await Task.Delay( 10 ); + SpawnEnemy(); + IsReady = true; + } + + private void RemoveCenterWalls() + { + if ( Cells == null ) + { + Log.Warning( "RemoveCenterWalls: _cells is null" ); + return; + } + + int centerX = Width / 2; + int centerY = Height / 2; + + int startX = Math.Max( 0, centerX - CenterClearRadius ); + int endX = Math.Min( Width - 1, centerX + CenterClearRadius ); + int startY = Math.Max( 0, centerY - CenterClearRadius ); + int endY = Math.Min( Height - 1, centerY + CenterClearRadius ); + + for ( int x = startX; x <= endX; x++ ) + { + for ( int y = startY; y <= endY; y++ ) + { + if ( Cells[x, y] == null ) continue; + + var cell = Cells[x, y]; + + for ( int i = 0; i < 4; i++ ) + { + if ( i >= 0 && i < cell.Walls.Length ) + cell.Walls[i] = false; + } + + // Сброс стен у соседей + if ( x > 0 && Cells[x - 1, y] != null ) + Cells[x - 1, y].Walls[1] = false; // Left neighbor's Right + + if ( x < Width - 1 && Cells[x + 1, y] != null ) + Cells[x + 1, y].Walls[3] = false; // Right neighbor's Left + + if ( y > 0 && Cells[x, y - 1] != null ) + Cells[x, y - 1].Walls[2] = false; // Bottom neighbor's Top + + if ( y < Height - 1 && Cells[x, y + 1] != null ) + Cells[x, y + 1].Walls[0] = false; // Top neighbor's Bottom + } + } + } + + public Vector3 GetRandomCellPosition() + { + var randomCell = Cells[Game.Random.Int( 0, Width - 1 ), Game.Random.Int( 0, Height - 1 )]; + + return WorldPosition + new Vector3( + randomCell.X * CellSize, + randomCell.Y * CellSize, + 0 + ) + mazeOffset; + } + + private void SpawnEnemy() + { + if ( !Networking.IsHost ) return; + + var enemy = EnemyPrefab.Clone(); + enemy.WorldPosition = GetRandomCellPosition(); + enemy.NetworkSpawn( null ); + + var agent = enemy.Components.Get(); + if ( agent != null ) + { + agent.Enabled = false; + agent.WorldPosition = enemy.WorldPosition; + agent.Enabled = true; + } + } + + private void ClearMaze() + { + // Удаляем оптимизированные стены + if ( _mazeWallsObject.IsValid() ) + { + _mazeWallsObject.Destroy(); + _mazeWallsObject = null; + } + + // Удаляем старые стены (для обратной совместимости) + foreach ( var wall in _walls ) + { + if ( wall.IsValid ) wall.Destroy(); + } + + _walls.Clear(); + } + + private void GenerateMaze() + { + Cells = new Cell[Width, Height]; + for ( int x = 0; x < Width; x++ ) + { + for ( int y = 0; y < Height; y++ ) + { + Cells[x, y] = new Cell( x, y ); + } + } + + var stack = new Stack(); + var rng = new Random( MazeSeed ); + var startCell = Cells[0, 0]; + startCell.Visited = true; + stack.Push( startCell ); + + while ( stack.Count > 0 ) + { + var current = stack.Peek(); + var neighbors = GetUnvisitedNeighbors( current ); + + if ( neighbors.Count > 0 ) + { + var next = neighbors[rng.Next( neighbors.Count )]; + RemoveWall( current, next ); + next.Visited = true; + stack.Push( next ); + } + else + { + stack.Pop(); + } + } + + AddExtraPassages( count: (int)(Width * Height * PassThrougthPercent) ); // 10% от клеток + RemoveCenterWalls(); + } + + private List GetUnvisitedNeighbors( Cell cell ) + { + var neighbors = new List(); + int x = cell.X; + int y = cell.Y; + + if ( x > 0 && !Cells[x - 1, y].Visited ) neighbors.Add( Cells[x - 1, y] ); + if ( x < Width - 1 && !Cells[x + 1, y].Visited ) neighbors.Add( Cells[x + 1, y] ); + if ( y > 0 && !Cells[x, y - 1].Visited ) neighbors.Add( Cells[x, y - 1] ); + if ( y < Height - 1 && !Cells[x, y + 1].Visited ) neighbors.Add( Cells[x, y + 1] ); + + return neighbors; + } + + private void RemoveWall( Cell current, Cell next ) + { + int dx = next.X - current.X; + int dy = next.Y - current.Y; + + if ( dx == 1 ) + { + current.Walls[1] = false; // Right + next.Walls[3] = false; // Left + } + else if ( dx == -1 ) + { + current.Walls[3] = false; // Left + next.Walls[1] = false; // Right + } + else if ( dy == 1 ) + { + current.Walls[2] = false; // Top + next.Walls[0] = false; // Bottom + } + else if ( dy == -1 ) + { + current.Walls[0] = false; // Bottom + next.Walls[2] = false; // Top + } + } + + private void BuildMaze() + { + for ( int x = 0; x < Width; x++ ) + { + for ( int y = 0; y < Height; y++ ) + { + var cell = Cells[x, y]; + Vector3 cellCenter = new Vector3( x * CellSize, y * CellSize, 0 ); + + if ( cell.Walls[0] ) // Bottom + { + Vector3 pos = cellCenter + new Vector3( 0, -CellSize / 2, 0 ); + SpawnWall( pos, Rotation.FromYaw( 0 ) ); + } + + if ( cell.Walls[1] ) // Right + { + Vector3 pos = cellCenter + new Vector3( CellSize / 2, 0, 0 ); + SpawnWall( pos, Rotation.FromYaw( 90 ) ); + } + + if ( cell.Walls[2] ) // Top + { + Vector3 pos = cellCenter + new Vector3( 0, CellSize / 2, 0 ); + SpawnWall( pos, Rotation.FromYaw( 0 ) ); + } + + if ( cell.Walls[3] ) // Left + { + Vector3 pos = cellCenter + new Vector3( -CellSize / 2, 0, 0 ); + SpawnWall( pos, Rotation.FromYaw( 90 ) ); + } + } + } + } + + private void AddBox( ModelBuilder builder, Matrix transform, Vector3 size ) + { + Vector3 halfSize = size / 2; + + Vector3[] localVerts = new Vector3[] + { + new(-halfSize.x, -halfSize.y, -halfSize.z), // 0 + new(halfSize.x, -halfSize.y, -halfSize.z), // 1 + new(halfSize.x, halfSize.y, -halfSize.z), // 2 + new(-halfSize.x, halfSize.y, -halfSize.z), // 3 + new(-halfSize.x, -halfSize.y, halfSize.z), // 4 + new(halfSize.x, -halfSize.y, halfSize.z), // 5 + new(halfSize.x, halfSize.y, halfSize.z), // 6 + new(-halfSize.x, halfSize.y, halfSize.z) // 7 + }; + + int[] indices = new int[] + { + 0, 2, 1, 0, 3, 2, // bottom (задом наперёд) + 4, 5, 6, 4, 6, 7, // top + 0, 5, 4, 0, 1, 5, // front + 1, 6, 5, 1, 2, 6, // right + 2, 7, 6, 2, 3, 7, // back + 3, 4, 7, 3, 0, 4 // left + }; + + + Vector3[] faceNormals = new Vector3[] + { + Vector3.Down, // bottom + Vector3.Up, // top + Vector3.Backward, // front + Vector3.Right, // right + Vector3.Forward, // back + Vector3.Left // left + }; + + var vertices = new List(); + var finalIndices = new List(); + + for ( int i = 0; i < indices.Length; i += 6 ) + { + Vector3 localNormal = faceNormals[i / 6]; + Vector3 worldNormal = transform.TransformNormal( localNormal ); + + for ( int j = 0; j < 6; j++ ) + { + int vertexIndex = indices[i + j]; + Vector3 localPos = localVerts[vertexIndex]; + Vector3 worldPos = transform.Transform( localPos ); + // Vector4 texCoord = new Vector4( 0, 0, 0, 0 ); // упрощённые UV + Vector4 texCoord = new Vector4( GetUVForVertex( j ).x, GetUVForVertex( j ).y, 0, 0 ); + + Vertex vertex = new Vertex( + position: worldPos, + normal: worldNormal, + tangent: Vector3.Right, + texCoord0: texCoord + ); + + vertex.Color = Color32.White; + vertex.TexCoord1 = new Vector4( 0, 0, 0, 0 ); + + vertices.Add( vertex ); + finalIndices.Add( vertices.Count - 1 ); + } + } + + if ( WallMaterial == null ) + { + Log.Error( "WallMaterial not set!" ); + return; + } + + var mesh = new Mesh( WallMaterial, MeshPrimitiveType.Triangles ); + mesh.CreateVertexBuffer( vertices.Count, Vertex.Layout, vertices ); + mesh.CreateIndexBuffer( finalIndices.Count, finalIndices ); + + builder.AddMesh( mesh ).AddCollisionMesh( vertices.Select( x => x.Position ).ToList(), indices.ToList() ); + } + + + private Vector2 GetUVForVertex( int index ) + { + return (index % 4) switch + { + 0 => new Vector2( 0, 0 ), + 1 => new Vector2( 1, 0 ), + 2 => new Vector2( 1, 1 ), + 3 => new Vector2( 0, 1 ), + _ => Vector2.Zero + }; + } + + + /// + /// Создание матрицы трансформации + /// + private Matrix CreateTransform( Vector3 position, Rotation rotation, Vector3 scale ) + { + return Matrix.CreateScale( scale ) + * Matrix.CreateRotation( rotation ) + * Matrix.CreateTranslation( position ); + } + + + /// + /// Оптимизированное построение стен лабиринта (единый меш) + /// + private void BuildMazeOptimized() + { + var builder = Model.Builder; + + // Создаем коллектор вершин для коллайдера + var collisionVertices = new List(); + + for ( int x = 0; x < Width; x++ ) + { + for ( int y = 0; y < Height; y++ ) + { + var cell = Cells[x, y]; + Vector3 cellCenter = + new Vector3( x * CellSize, y * CellSize, 0 ) + + mazeOffset; // + new Vector3( 0, 0, WallHeight * 24); + + + void AddWall( Vector3 position, Rotation rotation, Vector3 size ) + { + var transform = Matrix.CreateScale( size ) + * Matrix.CreateRotation( rotation ) + * Matrix.CreateTranslation( position ); + + // Добавляем меш к модели (используй свой AddBox) + AddBox( builder, transform, new Vector3( 1, 1, WallHeight * 24 ) ); + + // Добавляем коллизию — формируем коллизионный hull из углов куба + // Куб - 8 вершин (как в твоём AddBox), трансформируем и добавляем + Vector3 half = new Vector3( 0.5f, 0.5f, 0.5f ); + + Vector3[] localVerts = new Vector3[] + { + new Vector3( -half.x, -half.y, -half.z ), new Vector3( half.x, -half.y, -half.z ), + new Vector3( half.x, half.y, -half.z ), new Vector3( -half.x, half.y, -half.z ), + new Vector3( -half.x, -half.y, half.z ), new Vector3( half.x, -half.y, half.z ), + new Vector3( half.x, half.y, half.z ), new Vector3( -half.x, half.y, half.z ), + }; + + foreach ( var v in localVerts ) + collisionVertices.Add( transform.Transform( v ) ); + } + + if ( cell.Walls[0] ) + AddWall( cellCenter + new Vector3( 0, -CellSize / 2, 0 ), Rotation.Identity, + new Vector3( CellSize, WallThickness, WallHeight ) ); + if ( cell.Walls[1] ) + AddWall( cellCenter + new Vector3( CellSize / 2, 0, 0 ), Rotation.FromYaw( 90 ), + new Vector3( CellSize, WallThickness, WallHeight ) ); + if ( cell.Walls[2] ) + AddWall( cellCenter + new Vector3( 0, CellSize / 2, 0 ), Rotation.Identity, + new Vector3( CellSize, WallThickness, WallHeight ) ); + if ( cell.Walls[3] ) + AddWall( cellCenter + new Vector3( -CellSize / 2, 0, 0 ), Rotation.FromYaw( 90 ), + new Vector3( CellSize, WallThickness, WallHeight ) ); + } + } + + // Создаем модель с коллизией из всех добавленных hull вершин + var model = builder + .WithMass( 0 ) // Статическая модель + .Create(); + + if ( _mazeWallsObject.IsValid() ) + _mazeWallsObject.Destroy(); + + _mazeWallsObject = new GameObject(); + _mazeWallsObject.Name = "Maze Walls"; + _mazeWallsObject.SetParent( GameObject ); + _mazeWallsObject.LocalPosition = new Vector3( 0, 0, WallHeight * 24 ); + + var renderer = _mazeWallsObject.Components.Create(); + renderer.Model = model; + renderer.RenderType = ModelRenderer.ShadowRenderType.Off; + + if ( WallMaterial.IsValid() ) + renderer.MaterialOverride = WallMaterial; + + var collider = _mazeWallsObject.Components.Create(); + collider.Static = true; + + // var navMesh = _mazeWallsObject.Components.Create(); + // navMesh.LinkedCollider = collider; + // navMesh.IsBlocker = true; + + // _mazeWallsObject.NetworkSpawn( null ); + + Scene.NavMesh.SetDirty(); + } + + + private void ScaleFloor() + { + Floor.LocalPosition = new Vector3( 0, 0, -WallHeight ); + Floor.LocalScale = new Vector3( CellSize / 100 * Width, CellSize / 100 * Height, 0.5f ); + + var renderer = Floor.Components.Get(); + var material = renderer.MaterialOverride; + material?.Set( "g_vTexCoordScale", new Vector2( Width, Height ) ); + + Floor.NetworkSpawn( null ); + } + + private void SpawnWall( Vector3 position, Rotation rotation ) + { + var wall = new GameObject(); + wall.SetParent( GameObject ); + wall.LocalPosition = position + mazeOffset + new Vector3( 0, 0, WallHeight * 24 ); + wall.WorldRotation = rotation; + wall.LocalScale = new Vector3( CellSize / 50, WallThickness / 10, WallHeight ); + + var collider = wall.Components.Create(); + var renderer = wall.Components.Create(); + var navMeshArea = wall.Components.Create(); + navMeshArea.IsBlocker = true; + navMeshArea.LinkedCollider = collider; + renderer.Model = Model.Load( WallModelPath ); + collider.Static = true; + + wall.NetworkSpawn( null ); + _walls.Add( wall ); + } + + private void AddExtraPassages( int count ) + { + var rng = new Random( MazeSeed ); + int added = 0; + + while ( added < count ) + { + int x = rng.Next( 1, Width - 1 ); + int y = rng.Next( 1, Height - 1 ); + + var cell = Cells[x, y]; + + // Выбери случайного соседа + List<(int dx, int dy, int dir)> directions = new() + { + (0, -1, 0), // Bottom + (1, 0, 1), // Right + (0, 1, 2), // Top + (-1, 0, 3) // Left + }; + + var (dx, dy, dir) = directions[rng.Next( directions.Count )]; + int nx = x + dx; + int ny = y + dy; + + if ( nx < 0 || nx >= Width || ny < 0 || ny >= Height ) + continue; + + var neighbor = Cells[nx, ny]; + + if ( cell.Walls[dir] ) + { + RemoveWall( cell, neighbor ); + added++; + } + } + } + + public class Cell + { + public int X; + public int Y; + public bool Visited; + public bool[] Walls = { true, true, true, true }; // Bottom, Right, Top, Left + + public Cell( int x, int y ) + { + X = x; + Y = y; + } + } +} diff --git a/Code/NetworkManager.cs b/Code/NetworkManager.cs new file mode 100644 index 0000000..d3b92e0 --- /dev/null +++ b/Code/NetworkManager.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Sandbox; + +/// +/// Creates a networked game lobby and assigns player prefabs to connected clients. +/// +[Title( "Network Manager" )] +[Category( "Networking" )] +[Icon( "electrical_services" )] +public sealed class NetworkManager : Component, Component.INetworkListener +{ + /// + /// Create a server (if we're not joining one) + /// + [Property] + public bool StartServer { get; set; } = true; + + /// + /// The prefab to spawn for the player to control. + /// + [Property] + public GameObject PlayerPrefab { get; set; } + + /// + /// A list of points to choose from randomly to spawn the player in. If not set, we'll spawn at the + /// location of the NetworkHelper object. + /// + [Property] + public List SpawnPoints { get; set; } + + protected override async Task OnLoad() + { + if ( Scene.IsEditor ) + return; + + if ( StartServer && !Networking.IsActive ) + { + LoadingScreen.Title = "Creating Lobby"; + await Task.DelayRealtimeSeconds( 0.1f ); + Networking.CreateLobby( new() ); + } + } + + /// + /// A client is fully connected to the server. This is called on the host. + /// + public void OnActive( Connection channel ) + { + Log.Info( $"Player '{channel.DisplayName}' has joined the game" ); + + if ( !PlayerPrefab.IsValid() ) + return; + + // + // Find a spawn location for this player + // + var startLocation = FindSpawnLocation().WithScale( 1 ); + + // Spawn this object and make the client the owner + var player = PlayerPrefab.Clone( startLocation, name: $"Player - {channel.DisplayName}" ); + player.NetworkSpawn( channel ); + + var dedugan = player.Components.Get( true ); + + dedugan.SetupConnection( channel ); + } + + /// + /// Called when a client disconnects from the server. + /// + public void OnDisconnected( Connection channel ) + { + } + + /// + /// Called when the connection is being torn down. + /// + public void OnBecomeInactive( Connection channel ) + { + // Optional: Handle any cleanup before player becomes fully inactive + } + + /// + /// Find the most appropriate place to respawn + /// + Transform FindSpawnLocation() + { + // + // If they have spawn point set then use those + // + if ( SpawnPoints is not null && SpawnPoints.Count > 0 ) + { + return Random.Shared.FromList( SpawnPoints, default ).WorldTransform; + } + + // + // If we have any SpawnPoint components in the scene, then use those + // + var spawnPoints = Scene.GetAllComponents().ToArray(); + if ( spawnPoints.Length > 0 ) + { + return Random.Shared.FromArray( spawnPoints ).WorldTransform; + } + + // + // Failing that, spawn where we are + // + return WorldTransform; + } +} diff --git a/Code/UI/Chat.razor b/Code/UI/Chat.razor new file mode 100644 index 0000000..3e6828a --- /dev/null +++ b/Code/UI/Chat.razor @@ -0,0 +1,138 @@ +@using System; +@using Sandbox.UI; +@namespace Sandbox +@inherits PanelComponent +@implements Component.INetworkListener + + +
+ @foreach (var entry in Entries) + { +
+ @if (entry.steamid > 0) + { +
+ } +
@entry.author
+
@entry.message
+
+ } +
+ +
+ +
+ +
+ +@code +{ + + public static Chat Instance; + public Chat() => Instance = this; + public static bool IsActive => Instance.InputBox.HasFocus; + + public static void Open() + { + Instance.InputBox.Focus(); + } + + public static void AddText(string text) + { + Instance.AddTextInternal(text); + } + + public event Action OnChat; + public TextEntry InputBox; + + public record Entry(ulong steamid, string author, string message, RealTimeSince timeSinceAdded); + List Entries = new(); + + protected override void OnUpdate() + { + if (InputBox is null) + return; + + Panel.AcceptsFocus = false; + + if (Input.Pressed("chat")) + Open(); + + if (Entries.RemoveAll(x => x.timeSinceAdded > 20.0f) > 0) + { + StateHasChanged(); + } + + if (InputBox.HasFocus && Input.EscapePressed) + { + Input.EscapePressed = false; + ChatClosed(); + } + + SetClass("open", InputBox.HasFocus); + } + + void ChatFinished() + { + var text = InputBox.Text; + Mouse.Visibility = MouseVisibility.Auto; + + OnChat?.Invoke(text); + OnChat = null; + if (string.IsNullOrWhiteSpace(text)) + return; + + AddTextInternal(InputBox.Text); + InputBox.Text = ""; + } + + void ChatClosed() + { + var text = InputBox.Text; + InputBox.Text = ""; + OnChat = null; + } + + [Rpc.Broadcast] + public void AddTextInternal(string message) + { + message = message.Truncate(300); + + if (string.IsNullOrWhiteSpace(message)) + return; + + var author = Rpc.Caller.DisplayName; + var steamid = Rpc.Caller.SteamId; + + Log.Info($"{author}: {message}"); + + Entries.Add(new Entry(steamid, author, message, 0.0f)); + StateHasChanged(); + } + + [Rpc.Broadcast] + void AddSystemText(string message) + { + message = message.Truncate(300); + + if (string.IsNullOrWhiteSpace(message)) + return; + + Entries.Add(new Entry(0, "ℹ️", message, 0.0f)); + StateHasChanged(); + } + + void Component.INetworkListener.OnConnected(Connection channel) + { + if (IsProxy) return; + + AddSystemText($"{channel.DisplayName} has joined the game"); + } + + void Component.INetworkListener.OnDisconnected(Connection channel) + { + if (IsProxy) return; + + AddSystemText($"{channel.DisplayName} has left the game"); + } +} diff --git a/Code/UI/Chat.razor.scss b/Code/UI/Chat.razor.scss new file mode 100644 index 0000000..eb55053 --- /dev/null +++ b/Code/UI/Chat.razor.scss @@ -0,0 +1,70 @@ +Chat { + position: absolute; + top: 100px; + left: 200px; + bottom: 200px; + width: 600px; + justify-content: center; + align-items: center; + font-weight: bold; + border-radius: 20px; + flex-direction: column; + align-items: stretch; + font-size: 17px; + font-family: Poppins; + gap: 10px; + + .output { + flex-grow: 1; + flex-direction: column; + justify-content: flex-end; + align-items: stretch; + gap: 5px; + + .chat_entry { + padding: 2px; + gap: 10px; + text-shadow: 2px 2px 2px #000a; + + .avatar { + width: 32px; + height: 32px; + background-position: center; + background-size: cover; + border-radius: 4px; + aspect-ratio: 1; + min-width: 32px; + max-width: 32px; + } + + .author { + color: #2d95ce; + white-space: nowrap; + flex-shrink: 0; + } + + .message { + color: #fff; + } + } + } + + .input { + color: white; + + .textentry { + align-items: flex-start; + white-space: normal; + } + } + + &.open { + .input { + border-radius: 8px; + background-color: rgba(0,0,0,0.2); + backdrop-filter: blur(10px); + padding: 8px; + pointer-events: all; + } + } +} diff --git a/Code/UI/GUI.razor b/Code/UI/GUI.razor new file mode 100644 index 0000000..709c74c --- /dev/null +++ b/Code/UI/GUI.razor @@ -0,0 +1,25 @@ +@using Sandbox +@using Sandbox.UI +@inherits PanelComponent +@namespace Sandbox + + +
+
+ + + +@code { +} diff --git a/Code/UI/Scoreboard.razor b/Code/UI/Scoreboard.razor new file mode 100644 index 0000000..b7bce76 --- /dev/null +++ b/Code/UI/Scoreboard.razor @@ -0,0 +1,95 @@ +@using Sandbox; +@using Sandbox.UI; +@inherits PanelComponent + + + @*
*@ + @*
*@ + @*
*@ + @*
*@ + + + +
+
+ + + +
+ +
+ @if (Dedugan.All is not null) + { + foreach (var ded in Dedugan.All) + { +
+
+ +
+ + + +
+ } + } +
+
+
+ +@code +{ + public static bool Visible => Input.Down("Score"); + private NetworkManager _networkManager; + + private NetworkManager NetworkManager + { + get + { + if (_networkManager == null || !_networkManager.IsValid) + { + _networkManager = Scene.Directory.FindByName("Network Manager") + .FirstOrDefault()? + .GetComponent(); + } + return _networkManager; + } + } + + protected override void OnEnabled() + { + // Кэшируем NetworkManager при включении компонента + _networkManager = Scene.Directory.FindByName("Network Manager") + .FirstOrDefault()? + .GetComponent(); + } + + private string GetPlayerStatus(Connection conn) + { + var playerObj = Dedugan.GetByID( conn.Id ).GameObject; + return playerObj?.IsValid == true ? "In Game" : "Connecting"; + } + + private void OpenProfile(Connection connection) + { + Log.Info($"Opening profile: {connection.SteamId}"); + Game.Overlay.ShowPlayer(connection.SteamId); + } + + protected override int BuildHash() + { + if (!Visible || Dedugan.All == null) + return -1; + + var hash = new System.HashCode(); + hash.Add(Visible); + + foreach (var ded in Dedugan.All) + { + hash.Add(ded.Id); + hash.Add(ded.Connection.Ping); + hash.Add(ded.Name); + } + + return hash.ToHashCode(); + } +} diff --git a/Code/UI/Scoreboard.razor.scss b/Code/UI/Scoreboard.razor.scss new file mode 100644 index 0000000..9ad6689 --- /dev/null +++ b/Code/UI/Scoreboard.razor.scss @@ -0,0 +1,191 @@ +Scoreboard { + background: linear-gradient(135deg, #0a1a2b 0%, #08111f 100%); + border: 3px solid #2a3d54; + border-radius: 16px; + //box-shadow: + // 0 0 15px rgba(0, 150, 255, 0.2), + // inset 0 0 10px rgba(0, 100, 200, 0.1); + font-family: 'Orbitron', 'Poppins', sans-serif; + position: absolute; + width: 60%; + height: 70vh; + top: 15vh; + left: 20%; + padding: 30px; + display: flex; + flex-direction: column; + gap: 20px; + transition: all 0.2s ease; + z-index: 100; + overflow: hidden; + + &.hidden { + opacity: 0; + } + + .decoration { + position: absolute; + width: 60px; + height: 60px; + border: 2px solid rgba(0, 180, 255, 0.25); + opacity: 0.8; + box-shadow: 0 0 8px rgba(100, 200, 255, 0.1); + + &.top-left { + top: 10px; + left: 10px; + border-right: none; + border-bottom: none; + border-radius: 12px 0 0 0; + } + + &.top-right { + top: 10px; + right: 10px; + border-left: none; + border-bottom: none; + border-radius: 0 12px 0 0; + } + + &.bottom-left { + bottom: 10px; + left: 10px; + border-right: none; + border-top: none; + border-radius: 0 0 0 12px; + } + + &.bottom-right { + bottom: 10px; + right: 10px; + border-left: none; + border-top: none; + border-radius: 0 0 12px 0; + } + } + + .title { + font-size: 42px; + color: #a0e0ff; + text-align: center; + //text-shadow: + // 0 0 10px rgba(100, 200, 255, 0.7), + // 0 0 20px rgba(80, 180, 255, 0.4); + letter-spacing: 4px; + margin-bottom: 15px; + font-weight: 600; + text-transform: uppercase; + } + + .content { + display: flex; + flex-direction: column; + background-color: rgba(10, 25, 40, 0.6); + border-radius: 12px; + border: 1px solid #253a50; + overflow: hidden; + flex-grow: 1; + //box-shadow: inset 0 0 20px rgba(0, 30, 60, 0.5); + + .header { + display: flex; + padding: 15px 20px 15px 85px; + background: linear-gradient(90deg, #0f2a42 0%, #0a1d30 100%); + border-bottom: 2px solid #1e3a5c; + text-shadow: 0 0 5px rgba(100, 200, 255, 0.5); + + .column { + font-size: 18px; + color: #6eb4ff; + font-weight: 600; + letter-spacing: 1px; + + &.nick { + flex: 3; + text-align: left; + } + + &.status { + flex: 1; + text-align: center; + } + + &.ping { + flex: 1; + text-align: right; + padding-right: 20px; + } + } + } + + .player-list { + pointer-events: all; + flex-grow: 1; + height: 100%; + flex-direction: column; + overflow-x: hidden; + overflow-y: scroll; + + .player { + flex-shrink: 0; + display: flex; + align-items: center; + padding: 15px 25px; + transition: all 0.2s ease; + width: 100%; + //background: rgba(15, 30, 50, 0.4); + border-bottom: 1px solid rgba(40, 80, 120, 0.2); + cursor: pointer; + + &:hover { + //background: rgba(25, 60, 90, 0.4); + box-shadow: 0 0 15px rgba(0, 150, 255, 0.1); + } + + .avatar { + width: 45px; + height: 45px; + border-radius: 4px; + overflow: hidden; + margin-right: 20px; + border: 2px solid #2a4a6b; + box-shadow: 0 0 8px rgba(100, 180, 255, 0.2); + background: #0c1a2a; + + img { + width: 100%; + height: 100%; + object-fit: cover; + } + } + + .column { + font-size: 17px; + color: #c0e8ff; + text-shadow: 0 0 5px rgba(100, 180, 255, 0.3); + + &.nick { + flex: 3; + text-align: left; + font-weight: 500; + letter-spacing: 0.5px; + } + + &.status { + flex: 1; + text-align: center; + color: #6ecbff; + } + + &.ping { + flex: 1; + text-align: right; + padding-right: 20px; + font-family: 'Courier New', monospace; + color: #88d6ff; + } + } + } + } + } +} \ No newline at end of file diff --git a/Code/Weapons/PhysBullet.cs b/Code/Weapons/PhysBullet.cs new file mode 100644 index 0000000..815ed58 --- /dev/null +++ b/Code/Weapons/PhysBullet.cs @@ -0,0 +1,60 @@ +public sealed class PhysBullet : Component, Component.ICollisionListener +{ + [Property] public Collider collider { get; set; } + [Property] public Rigidbody BRigidbody { get; set; } + + protected override async void OnStart() + { + if ( collider != null ) + { + collider.OnTriggerEnter += OnTriggerEnter; + } + + await Task.DelaySeconds( 5 ); + GameObject.Destroy(); + } + + protected override void OnUpdate() + { + } + + async void ICollisionListener.OnCollisionStart( Collision collision ) + { + await Task.DelaySeconds( 1 ); + GameObject.Destroy(); + } + + // var a= Scene.Trace.Ray( collision.Contact.Point, collision.Contact.Point + collision.Contact.Normal * 10 ).Run(); + // Log.Info(collision.Other.GameObject); + // Log.Info(a.GameObject); + // DebugOverlay.Line(a.StartPosition,a.EndPosition, duration: 5.5f); + // DestroyGameObject(); + + public void OnTriggerEnter( Collider other ) + { + var components = other.Components; + + if ( components.TryGet( out var controller ) ) + { + if ( Network.IsOwner ) + return; + + controller.Enabled = true; + + // ModelHitboxes sas = controller.Components.Get(); + // collider.FindClosestPoint(other.WorldPosition); + + // var d = controller.GameObject.GetComponent(); + // + // d.Controller.Velocity = Vector3.Up * 2500; + + + // rb.MassOverride = 500f; + // + // rb.ApplyImpulse( Vector3.Up * 5000000 ); + + // rb.Destroy(); + // controller.bodyPhysics. + } + } +} diff --git a/ProjectSettings/Physics.config b/ProjectSettings/Physics.config new file mode 100644 index 0000000..409bd5d --- /dev/null +++ b/ProjectSettings/Physics.config @@ -0,0 +1,10 @@ +{ + "UseFixedUpdate": true, + "SubSteps": 25, + "FixedUpdateFrequency": 50, + "MaxFixedUpdates": 2, + "__guid": "6b9cc867-c971-4214-8b8f-69fbbd018bd8", + "__schema": "configdata", + "__type": "PhysicsSettings", + "__version": 1 +} \ No newline at end of file