This commit is contained in:
Oscar 2025-05-28 17:15:12 +03:00
parent 37173c8b39
commit 77c1704cd6
35 changed files with 80065 additions and 851 deletions

View File

@ -0,0 +1,28 @@
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.000000 0.001499 0.800219 1.000000]"
TextureColor "materials/default/default_color.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.186364"
TextureRoughness "materials/default/default_rough.tga"
//---- Metalness ----
g_flMetalness "0.413636"
//---- Fade ----
g_flFadeExponent "1.000"
//---- Fog ----
g_bFogEnabled "1"
//---- 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]"
}

View File

@ -0,0 +1,28 @@
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.000000 0.001499 0.800219 1.000000]"
TextureColor "materials/default/default_color.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.186364"
TextureRoughness "materials/default/default_rough.tga"
//---- Metalness ----
g_flMetalness "0.413636"
//---- Fade ----
g_flFadeExponent "1.000"
//---- Fog ----
g_bFogEnabled "1"
//---- 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]"
}

BIN
Assets/animations/test/models/Armature/Armature.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Assets/animations/test/models/test/test.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Assets/animations/test/test_anim.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,305 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:animgraph2:version{0f7898b8-5471-45c4-9867-cd9c46bcfdb5} -->
{
_class = "CAnimationGraph"
m_nodeManager =
{
_class = "CAnimNodeManager"
m_nodes =
[
{
key =
{
m_id = 115403816
}
value =
{
_class = "CRootAnimNode"
m_sName = "Unnamed"
m_vecPosition = [ 112.0, 32.0 ]
m_nNodeID =
{
m_id = 115403816
}
m_sNote = ""
m_inputConnection =
{
m_nodeID =
{
m_id = 1858842878
}
m_outputID =
{
m_id = 4294967295
}
}
}
},
{
key =
{
m_id = 931084490
}
value =
{
_class = "CSequenceAnimNode"
m_sName = "Unnamed"
m_vecPosition = [ -352.0, 64.0 ]
m_nNodeID =
{
m_id = 931084490
}
m_sNote = ""
m_tagSpans = [ ]
m_sequenceName = "test_anim"
m_playbackSpeed = 1.0
m_bLoop = true
}
},
{
key =
{
m_id = 1079480952
}
value =
{
_class = "CSequenceAnimNode"
m_sName = "Unnamed"
m_vecPosition = [ -352.0, 144.0 ]
m_nNodeID =
{
m_id = 1079480952
}
m_sNote = ""
m_tagSpans = [ ]
m_sequenceName = "test_anim2"
m_playbackSpeed = 1.0
m_bLoop = true
}
},
{
key =
{
m_id = 1858842878
}
value =
{
_class = "CStateMachineAnimNode"
m_sName = "Unnamed"
m_vecPosition = [ -112.0, 80.0 ]
m_nNodeID =
{
m_id = 1858842878
}
m_sNote = ""
m_states =
[
{
_class = "CAnimState"
m_transitions =
[
{
_class = "CAnimStateTransition"
m_conditions =
[
{
_class = "CParameterAnimCondition"
m_comparisonOp = 0
m_paramID =
{
m_id = 161239533
}
m_comparisonValue =
{
m_nType = 1
m_data = true
}
},
]
m_blendDuration = 0.2
m_destState =
{
m_id = 1645351481
}
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 = "1"
m_inputConnection =
{
m_nodeID =
{
m_id = 931084490
}
m_outputID =
{
m_id = 4294967295
}
}
m_stateID =
{
m_id = 1183446361
}
m_position = [ -80.0, -32.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 = "CParameterAnimCondition"
m_comparisonOp = 0
m_paramID =
{
m_id = 161239533
}
m_comparisonValue =
{
m_nType = 1
m_data = false
}
},
]
m_blendDuration = 0.2
m_destState =
{
m_id = 1183446361
}
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 = "2"
m_inputConnection =
{
m_nodeID =
{
m_id = 1079480952
}
m_outputID =
{
m_id = 4294967295
}
}
m_stateID =
{
m_id = 1645351481
}
m_position = [ 96.0, -32.0 ]
m_bIsStartState = false
m_bIsEndtState = false
m_bIsPassthrough = false
m_bIsRootMotionExclusive = false
m_bAlwaysEvaluate = false
},
]
m_bBlockWaningTags = false
m_bLockStateWhenWaning = false
}
},
]
}
m_pParameterList =
{
_class = "CAnimParameterList"
m_Parameters =
[
{
_class = "CBoolAnimParameter"
m_name = "anim"
m_id =
{
m_id = 161239533
}
m_previewButton = "ANIMPARAM_BUTTON_NONE"
m_bUseMostRecentValue = false
m_bAutoReset = false
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 =
[
"animations/test/test_anim.vmdl",
]
m_boneMergeModels = [ ]
m_cameraSettings =
{
m_flFov = 60.0
m_sLockBoneName = "Bone"
m_bLockCamera = false
m_bViewModelCamera = false
}
}

View File

@ -0,0 +1,104 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:modeldoc29:version{3cec427c-1b0e-4d48-a90a-0436f33a6041} -->
{
rootNode =
{
_class = "RootNode"
children =
[
{
_class = "MaterialGroupList"
children =
[
{
_class = "DefaultMaterialGroup"
remaps = [ ]
use_global_default = true
global_default_material = "animations/test/materials/armature/cylinder_test.vmat"
},
]
},
{
_class = "RenderMeshList"
children =
[
{
_class = "RenderMeshFile"
filename = "animations/test/test_anim.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 =
[
"Cylinder",
]
}
},
]
},
{
_class = "AnimationList"
children =
[
{
_class = "AnimFile"
name = "test_anim"
activity_name = ""
activity_weight = 1
weight_list_name = ""
fade_in_time = 0.2
fade_out_time = 0.2
looping = true
delta = false
worldSpace = false
hidden = false
anim_markup_ordered = false
disable_compression = false
disable_interpolation = false
enable_scale = false
source_filename = "animations/test/test_anim.fbx"
start_frame = -1
end_frame = -1
framerate = -1.0
take = 0
reverse = false
},
{
_class = "AnimFile"
name = "test_anim2"
activity_name = ""
activity_weight = 1
weight_list_name = ""
fade_in_time = 0.2
fade_out_time = 0.2
looping = true
delta = false
worldSpace = false
hidden = false
anim_markup_ordered = false
disable_compression = false
disable_interpolation = false
enable_scale = false
source_filename = "animations/test/test_anim.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 = "animations/test/test_anim.vanmgrph"
base_model_name = ""
}
}

BIN
Assets/animations/test_anim_2.fbx (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +0,0 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:animgraph2:version{0f7898b8-5471-45c4-9867-cd9c46bcfdb5} -->
{
_class = "CAnimationGraph"
m_nodeManager =
{
_class = "CAnimNodeManager"
m_nodes = [ ]
}
m_pParameterList =
{
_class = "CAnimParameterList"
m_Parameters = [ ]
}
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/citizen/citizen.vmdl",
]
m_boneMergeModels = [ ]
m_cameraSettings =
{
m_flFov = 60.0
m_sLockBoneName = "pelvis"
m_bLockCamera = false
m_bViewModelCamera = false
}
}

View File

@ -14,90 +14,73 @@
remaps = remaps =
[ [
{ {
from = "NEON_orange.vmat" from = "neon_orange.vmat"
to = "materials/club2/NEON_orange.vmat" to = "materials/club2/neon_orange.vmat"
}, },
{ {
from = "hidden_material.vmat" from = "hidden_material.vmat"
to = "materials/club2/hidden_material.vmat" to = "materials/club2/hidden_material.vmat"
}, },
{ {
from = "Scuffed Plastic with Rough Marks.001.vmat" from = "scuffed plastic with rough marks.001.vmat"
to = "materials/club2/Scuffed Plastic with Rough Marks.001.vmat" to = "materials/club2/scuffed plastic with rough marks.001.vmat"
}, },
{ {
from = "toilet_sign.vmat" from = "toilet_sign.vmat"
to = "materials/club2/toilet_sign.vmat" to = "materials/club2/toilet_sign.vmat"
}, },
{ {
from = "NEON_white.vmat" from = "neon_white.vmat"
to = "materials/club2/NEON_white.vmat" to = "materials/club2/neon_white.vmat"
}, },
{ {
from = "NEON_blue.vmat" from = "neon_blue.vmat"
to = "materials/club2/NEON_blue.vmat" to = "materials/club2/neon_blue.vmat"
}, },
{ {
from = "Spotlights.vmat" from = "spotlights.vmat"
to = "materials/club2/Spotlights.vmat" to = "materials/club2/spotlights.vmat"
}, },
{ {
from = "NEON_pink.vmat" from = "neon_pink.vmat"
to = "materials/club2/NEON_pink.vmat" to = "materials/club2/neon_pink.vmat"
}, },
{ {
from = "Light.vmat" from = "light.vmat"
to = "materials/club2/Light.vmat" to = "materials/club2/light.vmat"
}, },
{ {
from = "glossy black n white.vmat" from = "glossy black n white.vmat"
to = "materials/club2/glossy black n white.vmat" to = "materials/club2/glossy black n white.vmat"
}, },
{ {
from = "Base.vmat" from = "base.vmat"
to = "materials/club2/Base.vmat" to = "materials/club2/base.vmat"
}, },
{ {
from = "Wire.vmat" from = "wire.vmat"
to = "materials/club2/Wire.vmat" to = "materials/club2/wire.vmat"
}, },
{ {
from = "NEON_green.vmat" from = "neon_green.vmat"
to = "materials/club2/NEON_green.vmat" to = "materials/club2/neon_green.vmat"
}, },
{ {
from = "Door_material.vmat" from = "door_material.vmat"
to = "materials/club2/Door_material.vmat" to = "materials/club2/door_material.vmat"
}, },
{ {
from = "Handle_material.vmat" from = "handle_material.vmat"
to = "materials/club2/Handle_material.vmat" to = "materials/club2/handle_material.vmat"
}, },
{ {
from = "Material.012.vmat" from = "material.012.vmat"
to = "materials/club2/Material.012.vmat" to = "materials/club2/material.012.vmat"
}, },
{ {
from = "toilet_sign.001.vmat" from = "toilet_sign.001.vmat"
to = "materials/club2/toilet_sign.001.vmat" to = "materials/club2/toilet_sign.001.vmat"
}, },
{ {
from = "brick_painted_wall.vmat" from = "brick_painted_wall.vmat"
to = "materials/club2/brick_painted_wall.vmat" to = "materials/club2/brick_painted_wall.vmat"
@ -117,7 +100,7 @@
filename = "models/club2/club2.fbx" filename = "models/club2/club2.fbx"
import_translation = [ 0.0, 0.0, 0.0 ] import_translation = [ 0.0, 0.0, 0.0 ]
import_rotation = [ 0.0, 0.0, 0.0 ] import_rotation = [ 0.0, 0.0, 0.0 ]
import_scale = 1 import_scale = 1.0
align_origin_x_type = "None" align_origin_x_type = "None"
align_origin_y_type = "None" align_origin_y_type = "None"
align_origin_z_type = "None" align_origin_z_type = "None"
@ -136,7 +119,7 @@
[ [
{ {
_class = "ModelModifier_ScaleAndMirror" _class = "ModelModifier_ScaleAndMirror"
scale = 0.3937000036239624 scale = 0.3937
mirror_x = false mirror_x = false
mirror_y = false mirror_y = false
mirror_z = false mirror_z = false
@ -156,7 +139,7 @@
collision_tags = "solid" collision_tags = "solid"
}, },
] ]
} },
] ]
model_archetype = "" model_archetype = ""
primary_associated_entity = "" primary_associated_entity = ""

View File

@ -1,24 +1,47 @@
Layer0 { // THIS FILE IS AUTO-GENERATED
Layer0
{
shader "shaders/complex.shader" shader "shaders/complex.shader"
//---- PBR ---- //---- PBR ----
F_SPECULAR "1" F_SELF_ILLUM 1
F_SPECULAR 1
//---- Ambient Occlusion ---- //---- Ambient Occlusion ----
g_flAmbientOcclusionDirectDiffuse "0.000" g_flAmbientOcclusionDirectDiffuse "0.000"
g_flAmbientOcclusionDirectSpecular "0.000" g_flAmbientOcclusionDirectSpecular "0.000"
TextureAmbientOcclusion "materials/default/default_ao.tga" TextureAmbientOcclusion "materials/default/default_ao.tga"
//---- Color ---- //---- Color ----
g_flModelTintAmount "1.000" g_flModelTintAmount "1.000"
g_vColorTint "[0.000000 0.018154 0.532440 1.000000]" g_vColorTint "[0.000000 0.019608 0.533333 1.000000]"
TextureColor "materials/default/default_color.tga" TextureColor "materials/default/default_color.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.500000"
TextureRoughness "materials/default/default_rough.tga"
//---- Metalness ----
g_flMetalness "0.000000"
//---- Fade ---- //---- Fade ----
g_flFadeExponent "1.000" g_flFadeExponent "1.000"
//---- Fog ---- //---- Fog ----
g_bFogEnabled "1" g_bFogEnabled "1"
//---- Metalness ----
g_flMetalness "0.000"
//---- Normal ----
TextureNormal "materials/default/default_normal.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.500"
TextureRoughness "materials/default/default_rough.tga"
//---- Self Illum ----
g_flSelfIllumAlbedoFactor "1.000"
g_flSelfIllumBrightness "10.000"
g_flSelfIllumScale "1.000"
g_vSelfIllumScrollSpeed "[0.000 0.000]"
g_vSelfIllumTint "[0.203922 0.207843 0.517647 1.000000]"
TextureSelfIllumMask "[1.000000 1.000000 1.000000 0.000000]"
//---- Texture Coordinates ---- //---- Texture Coordinates ----
g_nScaleTexCoordUByModelScaleAxis "0" g_nScaleTexCoordUByModelScaleAxis "0"
g_nScaleTexCoordVByModelScaleAxis "0" g_nScaleTexCoordVByModelScaleAxis "0"

View File

@ -1,24 +1,47 @@
Layer0 { // THIS FILE IS AUTO-GENERATED
Layer0
{
shader "shaders/complex.shader" shader "shaders/complex.shader"
//---- PBR ---- //---- PBR ----
F_SPECULAR "1" F_SELF_ILLUM 1
F_SPECULAR 1
//---- Ambient Occlusion ---- //---- Ambient Occlusion ----
g_flAmbientOcclusionDirectDiffuse "0.000" g_flAmbientOcclusionDirectDiffuse "0.000"
g_flAmbientOcclusionDirectSpecular "0.000" g_flAmbientOcclusionDirectSpecular "0.000"
TextureAmbientOcclusion "materials/default/default_ao.tga" TextureAmbientOcclusion "materials/default/default_ao.tga"
//---- Color ---- //---- Color ----
g_flModelTintAmount "1.000" g_flModelTintAmount "1.000"
g_vColorTint "[0.003192 0.532440 0.000000 1.000000]" g_vColorTint "[0.003922 0.533333 0.000000 1.000000]"
TextureColor "materials/default/default_color.tga" TextureColor "materials/default/default_color.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.500000"
TextureRoughness "materials/default/default_rough.tga"
//---- Metalness ----
g_flMetalness "0.000000"
//---- Fade ---- //---- Fade ----
g_flFadeExponent "1.000" g_flFadeExponent "1.000"
//---- Fog ---- //---- Fog ----
g_bFogEnabled "1" g_bFogEnabled "1"
//---- Metalness ----
g_flMetalness "0.000"
//---- Normal ----
TextureNormal "materials/default/default_normal.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.500"
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.286275 0.588235 0.286275 1.000000]"
TextureSelfIllumMask "[1.000000 1.000000 1.000000 0.000000]"
//---- Texture Coordinates ---- //---- Texture Coordinates ----
g_nScaleTexCoordUByModelScaleAxis "0" g_nScaleTexCoordUByModelScaleAxis "0"
g_nScaleTexCoordVByModelScaleAxis "0" g_nScaleTexCoordVByModelScaleAxis "0"

View File

@ -1,24 +1,46 @@
Layer0 { // THIS FILE IS AUTO-GENERATED
Layer0
{
shader "shaders/complex.shader" shader "shaders/complex.shader"
//---- PBR ---- //---- PBR ----
F_SPECULAR "1" F_SELF_ILLUM 1
//---- Ambient Occlusion ---- //---- Ambient Occlusion ----
g_flAmbientOcclusionDirectDiffuse "0.000" g_flAmbientOcclusionDirectDiffuse "0.000"
g_flAmbientOcclusionDirectSpecular "0.000" g_flAmbientOcclusionDirectSpecular "0.000"
TextureAmbientOcclusion "materials/default/default_ao.tga" TextureAmbientOcclusion "materials/default/default_ao.tga"
//---- Color ---- //---- Color ----
g_flModelTintAmount "1.000" g_flModelTintAmount "1.000"
g_vColorTint "[0.532440 0.284371 0.000000 1.000000]" g_vColorTint "[0.533333 0.286275 0.000000 1.000000]"
TextureColor "materials/default/default_color.tga" TextureColor "materials/default/default_color.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "0.500000"
TextureRoughness "materials/default/default_rough.tga"
//---- Metalness ----
g_flMetalness "0.000000"
//---- Fade ---- //---- Fade ----
g_flFadeExponent "1.000" g_flFadeExponent "1.000"
//---- Fog ---- //---- Fog ----
g_bFogEnabled "1" g_bFogEnabled "0"
//---- Metalness ----
g_flMetalness "0.000"
//---- Normal ----
TextureNormal "materials/default/default_normal.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "2.000"
TextureRoughness "materials/default/default_rough.tga"
//---- Self Illum ----
g_flSelfIllumAlbedoFactor "1.000"
g_flSelfIllumBrightness "5.833"
g_flSelfIllumScale "16.000"
g_vSelfIllumScrollSpeed "[-1.613 -0.894]"
g_vSelfIllumTint "[0.701961 0.407843 0.211765 1.000000]"
TextureSelfIllumMask "[1.000000 1.000000 1.000000 0.000000]"
//---- Texture Coordinates ---- //---- Texture Coordinates ----
g_nScaleTexCoordUByModelScaleAxis "0" g_nScaleTexCoordUByModelScaleAxis "0"
g_nScaleTexCoordVByModelScaleAxis "0" g_nScaleTexCoordVByModelScaleAxis "0"

View File

@ -2,34 +2,53 @@
Layer0 Layer0
{ {
shader "shaders/fur.shader" shader "shaders/complex.shader"
//---- PBR ----
F_SELF_ILLUM 1
//---- Rendering ---- //---- Rendering ----
F_DO_NOT_CAST_SHADOWS 1 F_DO_NOT_CAST_SHADOWS 1
F_RENDER_BACKFACES 1 F_RENDER_BACKFACES 1
AO "materials/default/default_color.tga" //---- Ambient Occlusion ----
BaseColor "materials/default/default_color.tga" g_flAmbientOcclusionDirectDiffuse "0.000"
FurNoise "materials/default/default_color.tga" g_flAmbientOcclusionDirectSpecular "0.000"
g_flAOAmount "0.000" TextureAmbientOcclusion "materials/default/default_ao.tga"
g_flMinClipFudge "0.010"
g_flNoiseAlbedoMultiply "0.000" //---- Color ----
g_flNoiseAOAmount "0.000" g_flModelTintAmount "1.000"
g_flNoiseTiling "1.000" g_vColorTint "[0.949020 0.000000 1.000000 1.000000]"
g_flRimFudge "0.000" TextureColor "materials/default/default_color.tga"
g_flRimPower "10.000"
g_flWind "7.738" //---- Fade ----
g_flWindFreq "24.405" g_flFadeExponent "1.000"
g_flWindNoise "5.000"
g_vRimColour "[0.949020 0.000000 1.000000 1.000000]"
Metalness "materials/default/default_color.tga"
Normal "materials/default/default_color.tga"
Roughness "materials/default/default_rough.tga"
//---- Fog ---- //---- Fog ----
g_bFogEnabled "0" g_bFogEnabled "0"
//---- Translucent ---- //---- Metalness ----
g_flAlphaTestReference "0.378" g_flMetalness "0.000"
g_flAntiAliasedEdgeStrength "1.000"
//---- Normal ----
TextureNormal "materials/default/default_normal.tga"
//---- Roughness ----
g_flRoughnessScaleFactor "2.000"
TextureRoughness "materials/default/default_rough.tga"
//---- Self Illum ----
g_flSelfIllumAlbedoFactor "0.000"
g_flSelfIllumBrightness "10.000"
g_flSelfIllumScale "16.000"
g_vSelfIllumScrollSpeed "[2.581 -0.407]"
g_vSelfIllumTint "[1.000000 0.000000 0.831373 0.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 "[0.000 0.000]"
g_vTexCoordScrollSpeed "[0.000 0.000]"
} }

BIN
Assets/models/my_citizen/Hip Hop Dancing.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,102 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:modeldoc29:version{3cec427c-1b0e-4d48-a90a-0436f33a6041} -->
{
rootNode =
{
_class = "RootNode"
children =
[
{
_class = "MaterialGroupList"
children =
[
{
_class = "DefaultMaterialGroup"
remaps = [ ]
use_global_default = true
global_default_material = "materials/default.vmat"
},
]
},
{
_class = "AnimationList"
children =
[
{
_class = "AnimFile"
name = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
activity_name = "AAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAAAAA"
activity_weight = 1
weight_list_name = ""
fade_in_time = 0.2
fade_out_time = 0.2
looping = true
delta = false
worldSpace = false
hidden = false
anim_markup_ordered = false
disable_compression = false
disable_interpolation = false
enable_scale = false
source_filename = "animations/improve_dance_02_bb.fbx"
start_frame = -1
end_frame = -1
framerate = -1.0
take = 0
reverse = false
},
{
_class = "AnimFile"
name = "Hip_Hop_Dancing"
activity_name = ""
activity_weight = 1
weight_list_name = ""
fade_in_time = 0.2
fade_out_time = 0.2
looping = true
delta = false
worldSpace = false
hidden = false
anim_markup_ordered = false
disable_compression = false
disable_interpolation = false
enable_scale = false
source_filename = "models/my_citizen/Hip Hop Dancing.fbx"
start_frame = -1
end_frame = -1
framerate = -1.0
take = 0
reverse = false
},
{
_class = "AnimFile"
name = "test_anim_2"
activity_name = "test_anim_2"
activity_weight = 1
weight_list_name = ""
fade_in_time = 0.2
fade_out_time = 0.2
looping = true
delta = false
worldSpace = false
hidden = false
anim_markup_ordered = false
disable_compression = false
disable_interpolation = false
enable_scale = false
source_filename = "animations/test_anim_2.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/custom_citizen.vanmgrph"
base_model_name = "models/citizen/citizen.vmdl"
}
}

View File

@ -0,0 +1,42 @@
{
"RootObject": {
"__guid": "2c63f3c8-74af-4714-8468-a218a21fb5ad",
"Flags": 0,
"Name": "Camera",
"Enabled": true,
"Components": [
{
"__type": "Sandbox.CameraComponent",
"__guid": "afb1c494-6985-41ae-9eb8-11bdcf2cde71",
"BackgroundColor": "0.33333,0.46275,0.52157,1",
"ClearFlags": "All",
"FieldOfView": 100,
"FovAxis": "Horizontal",
"IsMainCamera": true,
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null,
"Orthographic": false,
"OrthographicHeight": 1204,
"Priority": 1,
"RenderExcludeTags": "",
"RenderTags": "",
"TargetEye": "None",
"Viewport": "0,0,1,1",
"ZFar": 32768,
"ZNear": 10
}
],
"Children": []
},
"ShowInMenu": false,
"MenuPath": null,
"MenuIcon": null,
"DontBreakAsTemplate": false,
"ResourceVersion": 1,
"__references": [],
"__version": 1
}

View File

@ -0,0 +1,73 @@
{
"RootObject": {
"__guid": "103ef800-3134-40da-8a05-a0064be12d67",
"Flags": 0,
"Name": "interactionpanel",
"Enabled": true,
"Components": [
{
"__type": "Sandbox.WorldPanel",
"__guid": "cfe821c6-090f-42cf-8ca7-569dfbddd2e0",
"HorizontalAlign": "Center",
"InteractionRange": 1000,
"LookAtCamera": true,
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null,
"PanelSize": "2000,2000",
"RenderOptions": {
"GameLayer": false,
"OverlayLayer": true,
"BloomLayer": false,
"AfterUILayer": false
},
"RenderScale": 1,
"VerticalAlign": "Center"
},
{
"__type": "HoverInfoPanel",
"__guid": "81524c56-d615-427d-9a40-ae967520f714",
"InteractionString": "Label",
"IsHoldInteraction": false,
"IsPressed": false,
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null,
"ProgressionHold": 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": [],
"__version": 1
}

File diff suppressed because it is too large Load Diff

View File

@ -1298,7 +1298,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.91373,0.98039,1,1", "LightColor": "0.91373,0.98039,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1329,7 +1329,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.77269,1,1", "LightColor": "0,0.77269,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1360,7 +1360,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "1,0,0,1", "LightColor": "1,0,0,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1391,7 +1391,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.26667,0,1,1", "LightColor": "0.26667,0,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1422,7 +1422,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,1,0.01667,1", "LightColor": "0,1,0.01667,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1453,7 +1453,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.00884,0.53023,1", "LightColor": "0,0.00884,0.53023,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1495,7 +1495,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.91373,0.98039,1,1", "LightColor": "0.91373,0.98039,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1526,7 +1526,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.77269,1,1", "LightColor": "0,0.77269,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1557,7 +1557,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "1,0,0,1", "LightColor": "1,0,0,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1588,7 +1588,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.26667,0,1,1", "LightColor": "0.26667,0,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1619,7 +1619,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,1,0.01667,1", "LightColor": "0,1,0.01667,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1650,7 +1650,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.00884,0.53023,1", "LightColor": "0,0.00884,0.53023,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1692,7 +1692,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.91373,0.98039,1,1", "LightColor": "0.91373,0.98039,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1723,7 +1723,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.77269,1,1", "LightColor": "0,0.77269,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1754,7 +1754,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "1,0,0,1", "LightColor": "1,0,0,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1785,7 +1785,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.26667,0,1,1", "LightColor": "0.26667,0,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1816,7 +1816,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,1,0.01667,1", "LightColor": "0,1,0.01667,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1847,7 +1847,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.00884,0.53023,1", "LightColor": "0,0.00884,0.53023,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1889,7 +1889,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.91373,0.98039,1,1", "LightColor": "0.91373,0.98039,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1920,7 +1920,7 @@
"ConeOuter": 42.6, "ConeOuter": 42.6,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.77269,1,1", "LightColor": "0,0.77269,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1951,7 +1951,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "1,0,0,1", "LightColor": "1,0,0,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -1982,7 +1982,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0.26667,0,1,1", "LightColor": "0.26667,0,1,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -2013,7 +2013,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,1,0.01667,1", "LightColor": "0,1,0.01667,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -2044,7 +2044,7 @@
"ConeOuter": 34.86, "ConeOuter": 34.86,
"Cookie": null, "Cookie": null,
"FogMode": "Enabled", "FogMode": "Enabled",
"FogStrength": 1, "FogStrength": 0.6,
"LightColor": "0,0.00884,0.53023,1", "LightColor": "0,0.00884,0.53023,1",
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
@ -2282,39 +2282,6 @@
} }
] ]
}, },
{
"__guid": "2c63f3c8-74af-4714-8468-a218a21fb5ad",
"Flags": 0,
"Name": "Camera",
"Enabled": true,
"Components": [
{
"__type": "Sandbox.CameraComponent",
"__guid": "afb1c494-6985-41ae-9eb8-11bdcf2cde71",
"BackgroundColor": "0.33333,0.46275,0.52157,1",
"ClearFlags": "All",
"FieldOfView": 100,
"FovAxis": "Horizontal",
"IsMainCamera": true,
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null,
"Orthographic": false,
"OrthographicHeight": 1204,
"Priority": 1,
"RenderExcludeTags": "",
"RenderTags": "",
"TargetEye": "None",
"Viewport": "0,0,1,1",
"ZFar": 32768,
"ZNear": 10
}
],
"Children": []
},
{ {
"__guid": "e53248e4-eacb-40a2-8e7f-902ddd3870cc", "__guid": "e53248e4-eacb-40a2-8e7f-902ddd3870cc",
"Flags": 0, "Flags": 0,
@ -2690,20 +2657,9 @@
"SurfaceVelocity": "0,0,0" "SurfaceVelocity": "0,0,0"
}, },
{ {
"__type": "MusicPlayerInteractions", "__type": "Sandbox.UI.MusicPlayerNextButton",
"__guid": "a9465371-6855-4fb1-b0de-777e7f0cc2c2", "__guid": "f1515dd7-1d73-4214-8ed8-32fc4fbfe8dc",
"__enabled": false, "Label": "Next track",
"Collider": {
"_type": "component",
"component_id": "dc47d030-3ddf-41a6-836f-d6aaed8928dc",
"go": "dcf53b7e-d474-43bf-973b-b56e3d0ad19d",
"component_type": "BoxCollider"
},
"InteractionDistance": 120,
"InteractionEnabled": true,
"InteractionHold": false,
"InteractionHoldDuration": 0.5,
"InteractionString": "Next track",
"MusicPlayer": { "MusicPlayer": {
"_type": "component", "_type": "component",
"component_id": "b1b3132b-9530-43ac-ad37-c3319cd6844b", "component_id": "b1b3132b-9530-43ac-ad37-c3319cd6844b",
@ -2715,43 +2671,49 @@
"OnComponentEnabled": null, "OnComponentEnabled": null,
"OnComponentFixedUpdate": null, "OnComponentFixedUpdate": null,
"OnComponentStart": null, "OnComponentStart": null,
"OnComponentUpdate": null "OnComponentUpdate": null,
}, "RequiresHold": false
{
"__type": "Sandbox.MusicPlayerNextButton",
"__guid": "a595f8b9-a165-4cec-82d8-d22250989049",
"Label": "Next track",
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null
} }
], ],
"Children": [] "Children": []
}, },
{ {
"__guid": "e639e41f-b7b3-435d-8071-f870ff8bc296", "__guid": "62f21cd0-bc18-43b6-aed4-905f28eb7dd6",
"Flags": 0, "Flags": 0,
"Name": "Cube", "Name": "test_anim",
"Position": "0,36.35073,-737.4138", "Position": "69.22212,98.3616,4800.975",
"Rotation": "0,0.000000000000001776357,0.9999999,0.00000003344307",
"Scale": "0.236241,0.236241,0.236241",
"Enabled": true, "Enabled": true,
"Components": [ "Components": [
{ {
"__type": "Sandbox.ModelRenderer", "__type": "Sandbox.SkinnedModelRenderer",
"__guid": "4fff915f-fbfc-4b98-9450-bb3fc80b1bc9", "__guid": "9aaa0e4a-8aa3-480f-8e2d-6fc9cae437e6",
"AnimationGraph": "animations/test/test_anim.vanmgrph",
"BodyGroups": 18446744073709551615, "BodyGroups": 18446744073709551615,
"BoneMergeTarget": null,
"CreateAttachments": false, "CreateAttachments": false,
"CreateBoneObjects": false,
"MaterialGroup": null, "MaterialGroup": null,
"MaterialOverride": null, "MaterialOverride": null,
"Model": "models/dev/box.vmdl", "Model": "animations/test/test_anim.vmdl",
"Morphs": {},
"OnComponentDestroy": null, "OnComponentDestroy": null,
"OnComponentDisabled": null, "OnComponentDisabled": null,
"OnComponentEnabled": null, "OnComponentEnabled": null,
"OnComponentFixedUpdate": null, "OnComponentFixedUpdate": null,
"OnComponentStart": null, "OnComponentStart": null,
"OnComponentUpdate": null, "OnComponentUpdate": null,
"Parameters": {
"bools": {
"anim": false
},
"ints": {},
"floats": {},
"vectors": {},
"rotations": {}
},
"PlaybackRate": 0.75,
"RenderOptions": { "RenderOptions": {
"GameLayer": true, "GameLayer": true,
"OverlayLayer": false, "OverlayLayer": false,
@ -2759,39 +2721,12 @@
"AfterUILayer": false "AfterUILayer": false
}, },
"RenderType": "On", "RenderType": "On",
"Tint": "1,1,1,1" "Sequence": {
"Name": null,
"Looping": true
}, },
{ "Tint": "1,1,1,1",
"__type": "Sandbox.BoxCollider", "UseAnimGraph": true
"__guid": "dd8127ff-0a7a-45bf-b31b-1a9975f96e29",
"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,
"Scale": "50,50,50",
"Static": true,
"Surface": null,
"SurfaceVelocity": "0,0,0"
},
{
"__type": "Sandbox.MusicPlayerNextButton",
"__guid": "c2f6c054-d96b-420c-911d-3e860acd0e0a",
"Label": "Next track",
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null
} }
], ],
"Children": [] "Children": []

View File

@ -0,0 +1,15 @@
using Sandbox;
public sealed partial class Dedugan
{
void UpdateCustomAnimations()
{
if ( Network.IsOwner )
{
// IsDancing = Input.Down( "Dance" );
}
Log.Info(IsDancing);
Renderer.Set( "test_dance", IsDancing );
}
}

View File

@ -10,9 +10,19 @@
} }
else else
{ {
// Camera.LocalRotation = EyeAngles.ToRotation();
// var offset = CameraPivot.LocalPosition + CameraPivot.LocalRotation.Backward * CamOffsetX;
// Camera.LocalPosition = offset * Camera.LocalRotation;
Camera.LocalRotation = EyeAngles.ToRotation(); Camera.LocalRotation = EyeAngles.ToRotation();
var offset = CameraPivot.LocalPosition + CameraPivot.LocalRotation.Backward * (CamOffsetX + EyeAngles.pitch * .5f); var pivotOffset = CameraPivot.LocalRotation.Backward * CamOffsetX;
Camera.LocalPosition = offset * Camera.LocalRotation; var localPitchOffset = Camera.LocalRotation.Down * MathF.Max( 0f, EyeAngles.pitch ) * 0.32f +
Camera.LocalRotation.Backward * MathF.Max( 0f, EyeAngles.pitch ) * 0.7f +
Camera.LocalRotation.Up * MathF.Min( 0f, EyeAngles.pitch ) * 0.5f +
Camera.LocalRotation.Backward * MathF.Min( 0f, EyeAngles.pitch ) * 0.8f;
var offset = (CameraPivot.LocalPosition + pivotOffset ) * EyeAngles.ToRotation() + localPitchOffset;
Camera.LocalPosition = offset;
} }
} }
} }

View File

@ -1,4 +1,9 @@
public sealed partial class Dedugan using Sandbox;
using Sandbox.Utility;
using Sandbox.Diagnostics;
using System.Linq;
public sealed partial class Dedugan : Component
{ {
public Component Pressed { get; set; } public Component Pressed { get; set; }
public bool EnablePressing { get; set; } = true; public bool EnablePressing { get; set; } = true;
@ -10,19 +15,19 @@
public bool CameraTraceIsHit { get; set; } public bool CameraTraceIsHit { get; set; }
public Vector3 TracedHitNormal { get; set; } public Vector3 TracedHitNormal { get; set; }
private GameObject interactionPanel; // private TimeSince HoldTime = 0;
private static GameObject interactionPanelPrefab; // private bool Holding = false;
// private bool HoldingInteractionHappened = false;
private TimeSince holdTimer; void InteractionsUpdate()
private bool isHolding;
private bool triggered;
private const string InteractionPrefabPath = "prefabs/InteractionPanel.prefab";
public void UpdateLookAt()
{ {
if ( EnablePressing ) if (!EnablePressing)
{ {
// Holding = false;
// HoldingInteractionHappened = false;
return;
}
if (Pressed.IsValid()) if (Pressed.IsValid())
{ {
UpdatePressed(); UpdatePressed();
@ -32,39 +37,12 @@
UpdateHovered(); UpdateHovered();
} }
} }
}
private void UpdatePressed() private void UpdatePressed()
{ {
bool flag = Input.Pressed( "Use" ); bool flag = Input.Down("use");
if (flag && Pressed.Components.TryGet<IPressable>(out var pressable)) if (flag && Pressed.Components.TryGet<IPressable>(out var pressable))
{
if ( pressable.RequiresHold )
{
if ( !isHolding )
{
holdTimer = 0;
isHolding = true;
triggered = false;
}
if ( triggered ) return;
var progress = holdTimer / pressable.HoldTime;
ShowInteractionUI( TracedHitPos, pressable.DisplayText, true, progress );
if ( holdTimer > pressable.HoldTime )
{
triggered = true;
pressable.Pressing( new IPressable.Event
{
Ray = new Ray( Camera.WorldPosition, EyeAngles.ToRotation().Forward ),
Source = this
} );
}
}
else
{ {
flag = pressable.Pressing(new IPressable.Event flag = pressable.Pressing(new IPressable.Event
{ {
@ -72,7 +50,6 @@
Source = this Source = this
}); });
} }
}
if (GetDistanceFromGameObject(Pressed.GameObject, Camera.WorldPosition) > InteractDistance) if (GetDistanceFromGameObject(Pressed.GameObject, Camera.WorldPosition) > InteractDistance)
{ {
@ -96,15 +73,9 @@
Ray = new Ray(Camera.WorldPosition, EyeAngles.ToRotation().Forward), Ray = new Ray(Camera.WorldPosition, EyeAngles.ToRotation().Forward),
Source = this Source = this
}); });
ShowInteractionUI( TracedHitPos, pressable.DisplayText );
}
else
{
ClearInteractionUI();
} }
if ( Input.Pressed( "use" ) ) if (Input.Down("use"))
{ {
StartPressing(Hovered); StartPressing(Hovered);
} }
@ -113,7 +84,6 @@
public void StartPressing(Component obj) public void StartPressing(Component obj)
{ {
StopPressing(); StopPressing();
if (!obj.IsValid()) if (!obj.IsValid())
{ {
ISceneEvent<PlayerController.IEvents>.PostToGameObject(GameObject, x => x.FailPressing()); ISceneEvent<PlayerController.IEvents>.PostToGameObject(GameObject, x => x.FailPressing());
@ -121,24 +91,21 @@
} }
var component = obj.Components.Get<IPressable>(FindMode.EnabledInSelfAndDescendants); var component = obj.Components.Get<IPressable>(FindMode.EnabledInSelfAndDescendants);
if (component != null) if (component != null)
{ {
if ( !component.CanPress( new IPressable.Event var pressEvent = new IPressable.Event
{ {
Ray = new Ray(Camera.WorldPosition, EyeAngles.ToRotation().Forward), Ray = new Ray(Camera.WorldPosition, EyeAngles.ToRotation().Forward),
Source = this Source = this
} ) ) };
if (!component.CanPress(pressEvent))
{ {
ISceneEvent<PlayerController.IEvents>.PostToGameObject(GameObject, x => x.FailPressing()); ISceneEvent<PlayerController.IEvents>.PostToGameObject(GameObject, x => x.FailPressing());
return; return;
} }
component.Press( new IPressable.Event component.Press(pressEvent);
{
Ray = new Ray( Camera.WorldPosition, EyeAngles.ToRotation().Forward ),
Source = this
} );
} }
Pressed = obj; Pressed = obj;
@ -149,47 +116,6 @@
} }
} }
private Component TryGetLookedAt()
{
for ( float num = 0f; num <= 4f; num += 2f )
{
var from = Scene.Camera.WorldPosition + Scene.Camera.WorldRotation.Forward;
var to = from + Scene.Camera.WorldRotation.Forward * (InteractDistance - num);
var eyeTrace = Scene.Trace.Ray( from, to ).IgnoreGameObjectHierarchy( GameObject ).Radius( num ).Run();
TracedHitPos = eyeTrace.Hit ? eyeTrace.HitPosition : eyeTrace.EndPosition;
CameraTraceIsHit = eyeTrace.Hit;
TracedHitNormal = eyeTrace.Normal;
if ( !eyeTrace.Hit || !eyeTrace.GameObject.IsValid() )
continue;
Component foundComponent = null;
ISceneEvent<PlayerController.IEvents>.PostToGameObject( GameObject, x =>
{
foundComponent = x.GetUsableComponent( eyeTrace.GameObject ) ?? foundComponent;
} );
if ( foundComponent.IsValid() )
return foundComponent;
foreach ( var component in eyeTrace.GameObject.Components.GetAll<IPressable>() )
{
if ( component.CanPress( new IPressable.Event
{
Ray = new Ray( Camera.WorldPosition, EyeAngles.ToRotation().Forward ),
Source = this
} ) )
{
return component as Component;
}
}
}
return null;
}
public void StopPressing() public void StopPressing()
{ {
if (Pressed.IsValid()) if (Pressed.IsValid())
@ -207,10 +133,6 @@
Pressed = null; Pressed = null;
} }
isHolding = false;
triggered = false;
ClearInteractionUI();
} }
private void SwitchHovered(Component obj) private void SwitchHovered(Component obj)
@ -224,79 +146,74 @@
if (Hovered == obj) if (Hovered == obj)
{ {
if (Hovered is IPressable pressable) if (Hovered is IPressable pressable)
{
pressable.Look(e); pressable.Look(e);
}
return; return;
} }
if ( Hovered is IPressable pressable2 ) if (Hovered is IPressable oldPressable)
{ oldPressable.Blur(e);
pressable2.Blur( e );
Hovered = null;
}
Hovered = obj; Hovered = obj;
if ( Hovered is IPressable pressable3 ) if (Hovered is IPressable newPressable)
{ {
pressable3.Hover( e ); newPressable.Hover(e);
pressable3.Look( e ); newPressable.Look(e);
} }
} }
private Component TryGetLookedAt()
{
for (float num = 0f; num <= 4f; num += 2f)
{
var from = Scene.Camera.WorldPosition + Scene.Camera.WorldRotation.Forward;
var to = from + Scene.Camera.WorldRotation.Forward * (InteractDistance - num);
var trace = Scene.Trace.Ray(from, to).IgnoreGameObjectHierarchy(GameObject).Radius(num).Run();
TracedHitPos = trace.Hit ? trace.HitPosition : trace.EndPosition;
CameraTraceIsHit = trace.Hit;
TracedHitNormal = trace.Normal;
if (!trace.Hit || !trace.GameObject.IsValid()) continue;
Component foundComponent = null;
ISceneEvent<PlayerController.IEvents>.PostToGameObject(GameObject, x =>
{
foundComponent = x.GetUsableComponent(trace.GameObject) ?? foundComponent;
});
if (foundComponent.IsValid()) return foundComponent;
foreach (var component in trace.GameObject.Components.GetAll<IPressable>())
{
if (component.CanPress(new IPressable.Event
{
Ray = new Ray(Camera.WorldPosition, EyeAngles.ToRotation().Forward),
Source = this
}))
{
return component as Component;
}
}
}
return null;
}
private float GetDistanceFromGameObject(GameObject obj, Vector3 point) private float GetDistanceFromGameObject(GameObject obj, Vector3 point)
{ {
var a = obj.WorldPosition; Vector3 closest = obj.WorldPosition;
var b = Camera.WorldPosition; float minDist = Vector3.DistanceBetween(closest, point);
float minDist = Vector3.DistanceBetween( a, b );
foreach ( var collider in Pressed.GetComponentsInChildren<Collider>() ) foreach (var col in Pressed.GetComponentsInChildren<Collider>())
{ {
var closest = collider.FindClosestPoint( Camera.WorldPosition ); Vector3 cp = col.FindClosestPoint(point);
var dist = Vector3.DistanceBetween( closest, Camera.WorldPosition ); float dist = Vector3.DistanceBetween(cp, point);
if (dist < minDist) if (dist < minDist)
{
minDist = dist; minDist = dist;
} }
}
return minDist; return minDist;
} }
private void ShowInteractionUI( Vector3 position, string text, bool showProgress = false, float progress = 0f )
{
if ( interactionPanelPrefab == null )
{
interactionPanelPrefab = GameObject.GetPrefab( InteractionPrefabPath );
if ( interactionPanelPrefab == null ) return;
}
if ( !interactionPanel.IsValid() )
{
interactionPanel = interactionPanelPrefab.Clone( GameObject.Scene );
}
interactionPanel.Transform.Position = position;
interactionPanel.Transform.Rotation = Rotation.LookAt( Camera.WorldPosition - position );
var panel = interactionPanel.GetComponent<PanelComponent>()?.GetPanel();
if ( panel is not null )
{
panel.SetProperty( "InteractionString", text );
panel.SetProperty( "IsHoldInteraction", showProgress );
panel.SetProperty( "ProgressionHold", progress );
}
}
private void ClearInteractionUI()
{
if ( interactionPanel.IsValid() )
{
interactionPanel.Destroy();
interactionPanel = null;
}
}
} }

View File

@ -7,9 +7,10 @@ public sealed partial class Dedugan : Component
{ {
[RequireComponent] public ShrimpleCharacterController.ShrimpleCharacterController Controller { get; set; } [RequireComponent] public ShrimpleCharacterController.ShrimpleCharacterController Controller { get; set; }
[RequireComponent] public CitizenAnimationHelper AnimationHelper { get; set; } [RequireComponent] public CitizenAnimationHelper AnimationHelper { get; set; }
// [Property] public SkinnedModelRenderer Anim {get; set;}
public SkinnedModelRenderer Renderer { get; set; } public SkinnedModelRenderer Renderer { get; set; }
public GameObject Camera { get; set; } [Property] public GameObject Camera { get; set; }
[Property] public GameObject CameraPivot { get; set; } [Property] public GameObject CameraPivot { get; set; }
[Property][Range(1f, 200f, 1f)] public float CamOffsetX { get; set; } [Property][Range(1f, 200f, 1f)] public float CamOffsetX { get; set; }
@ -22,7 +23,7 @@ public sealed partial class Dedugan : Component
[Sync] public Angles NetworkedEyeAngles { get; set; } [Sync] public Angles NetworkedEyeAngles { get; set; }
public Angles EyeAngles { get; set; } public Angles EyeAngles { get; set; }
[Sync] private float IsDucking { get; set; } = 0f; [Sync] private float IsDucking { get; set; } = 0f;
[Sync] public bool IsDancing { get; set; } = false;
private RagdollController RagdollController { get; set; } private RagdollController RagdollController { get; set; }
public Vector3 OverrideGravity { get; set; } = Vector3.Zero; public Vector3 OverrideGravity { get; set; } = Vector3.Zero;
@ -38,13 +39,11 @@ public sealed partial class Dedugan : Component
RagdollController = Components.Get<RagdollController>(); RagdollController = Components.Get<RagdollController>();
Renderer = Components.Get<SkinnedModelRenderer>(FindMode.EverythingInSelfAndDescendants); Renderer = Components.Get<SkinnedModelRenderer>(FindMode.EverythingInSelfAndDescendants);
if (!Network.IsOwner) return; var cameraComponent = Camera.GetComponent<CameraComponent>();
cameraComponent.Enabled = false;
var cameraComponent = Scene.Camera; if (!Network.IsOwner) return;
Camera = cameraComponent.GameObject; cameraComponent.Enabled = true;
Camera.SetParent(GameObject);
cameraComponent.ZFar = 32768f;
cameraComponent.FieldOfView = 100f;
} }
protected override void OnUpdate() protected override void OnUpdate()
@ -53,6 +52,7 @@ public sealed partial class Dedugan : Component
{ {
EyeAngles += Input.AnalogLook; EyeAngles += Input.AnalogLook;
EyeAngles = EyeAngles.WithPitch(MathX.Clamp(EyeAngles.pitch, -89f, 89f)); EyeAngles = EyeAngles.WithPitch(MathX.Clamp(EyeAngles.pitch, -89f, 89f));
NetworkedEyeAngles = EyeAngles;
var targetRotation = Rotation.LookAt(Rotation.FromYaw(EyeAngles.yaw).Forward, -_directionToAxis); var targetRotation = Rotation.LookAt(Rotation.FromYaw(EyeAngles.yaw).Forward, -_directionToAxis);
var currentForward = Renderer.LocalRotation.Forward; var currentForward = Renderer.LocalRotation.Forward;
@ -60,19 +60,39 @@ public sealed partial class Dedugan : Component
if (angleDiff > 15f && Controller.Velocity.Length > 10f) if (angleDiff > 15f && Controller.Velocity.Length > 10f)
{ {
NetworkedEyeAngles = EyeAngles;
Renderer.LocalRotation = Rotation.Slerp(Renderer.LocalRotation, Rotation.FromYaw(EyeAngles.yaw), Time.Delta * 3f); Renderer.LocalRotation = Rotation.Slerp(Renderer.LocalRotation, Rotation.FromYaw(EyeAngles.yaw), Time.Delta * 3f);
} }
RotateCamera(); RotateCamera();
UpdateLookAt(); InteractionsUpdate();
// UpdatePressed();
} }
else else
{ {
EyeAngles = NetworkedEyeAngles; EyeAngles = NetworkedEyeAngles;
Renderer.LocalRotation = Rotation.Slerp(Renderer.LocalRotation, Rotation.FromYaw(EyeAngles.yaw), Time.Delta * 5f);
var targetRotation = Rotation.LookAt(Rotation.FromYaw(EyeAngles.yaw).Forward, -_directionToAxis);
var currentForward = Renderer.LocalRotation.Forward;
float angleDiff = currentForward.Angle(targetRotation.Forward);
if (angleDiff > 15f && Controller.Velocity.Length > 10f)
{
Renderer.LocalRotation = Rotation.Slerp(Renderer.LocalRotation, Rotation.FromYaw(EyeAngles.yaw), Time.Delta * 3f);
} }
// Renderer.LocalRotation = Rotation.Slerp(Renderer.LocalRotation, Rotation.FromYaw(EyeAngles.yaw), Time.Delta * 5f);
Camera.LocalRotation = EyeAngles.ToRotation();
var pivotOffset = CameraPivot.LocalRotation.Backward * CamOffsetX;
var localPitchOffset = Camera.LocalRotation.Down * MathF.Max( 0f, EyeAngles.pitch ) * 0.32f +
Camera.LocalRotation.Backward * MathF.Max( 0f, EyeAngles.pitch ) * 0.7f +
Camera.LocalRotation.Up * MathF.Min( 0f, EyeAngles.pitch ) * 0.5f +
Camera.LocalRotation.Backward * MathF.Min( 0f, EyeAngles.pitch ) * 0.8f;
var offset = (CameraPivot.LocalPosition + pivotOffset ) * EyeAngles.ToRotation() + localPitchOffset;
Camera.LocalPosition = offset;
}
UpdateCustomAnimations();
} }
protected override void OnFixedUpdate() protected override void OnFixedUpdate()

View File

@ -1,13 +1,15 @@
using Sandbox; using Sandbox;
using Sandbox.UI;
public sealed class MusicPlayerInteractions : SimpleInteractions.SimpleInteraction public sealed class MusicPlayerInteractions : InteractionButton
{ {
[Property] public MyMusicPlayer MusicPlayer { get; set; } [Property] public MyMusicPlayer MusicPlayer { get; set; }
[Rpc.Broadcast] public override bool Press(IPressable.Event e)
protected override void OnInteract()
{ {
// Log.Info($"{Rpc.Caller.DisplayName} interacted with {this.GameObject.Name}!"); base.Press(e);
Log.Info("PRESSED");
MusicPlayer.Next(); MusicPlayer.Next();
return true;
} }
} }

View File

@ -1,45 +0,0 @@
namespace Sandbox;
[Icon( "skip_next" )]
public sealed class MusicPlayerNextButton : Component, Component.IPressable
{
[Property] public string Label { get; set; } = "Next track";
public bool Press( Component.IPressable.Event e )
{
Log.Info( $"Press от {e.Source}" );
return true;
}
public void Hover( Component.IPressable.Event e )
{
Log.Info( $"Hover от {e.Source}" );
}
public void Look( Component.IPressable.Event e )
{
Log.Info( "Look..." );
}
public void Blur( Component.IPressable.Event e )
{
Log.Info( "Blur — игрок отвёл взгляд" );
}
public void Release( Component.IPressable.Event e )
{
Log.Info( "Release — игрок отпустил кнопку" );
}
public bool Pressing( Component.IPressable.Event e )
{
// возвращаем true, чтобы удержание продолжалось
return true;
}
public bool CanPress( Component.IPressable.Event e )
{
// например, можно сделать: return !isCoolingDown
return true;
}
}

View File

@ -1,8 +1,7 @@
@using System.Threading.Tasks @inherits PanelComponent
@inherits PanelComponent
<root class="interaction-panel"> <root class="interaction-panel">
<div class="label">@InteractionString</div> <div class="label @(IsPressed ? "pressed" : "")">@InteractionString</div>
@if ( IsHoldInteraction ) @if ( IsHoldInteraction )
{ {
@ -12,15 +11,54 @@
} }
</root> </root>
<style lang="scss">
.interaction-panel {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
transition: all 0.1s ease;
.progress-bar {
width: 100px;
height: 8px;
background-color: #333;
border-radius: 4px;
.progress-fill {
height: 100%;
background-color: limegreen;
border-radius: 4px;
}
}
.label {
padding: 8px;
border-radius: 6px;
color: white;
font-size: 56px;
background-color: rgba(0, 128, 255, 0.2);
transition: all 0.1s ease;
}
.label.pressed {
background-color: rgba(0, 128, 255, 0.6);
transform: scale(1.4);
}
}
</style>
@code { @code {
[Property] public string InteractionString { get; set; } = "Interact"; [Property] public string InteractionString { get; set; } = "Interact";
[Property] public bool IsHoldInteraction { get; set; } = false; [Property] public bool IsHoldInteraction { get; set; } = false;
[Property] public float ProgressionHold { get; set; } = 0f; [Property] public float ProgressionHold { get; set; } = 0f;
[Property] public bool IsPressed { get; set; } = false;
public async Task TriggerInteractAnimation() public void SetPressed(bool value)
{ {
AddClass("interacted"); IsPressed = value;
await Task.Delay(300); StateHasChanged(); // << 🔁 вручную обновим UI
RemoveClass("interacted");
} }
} }

View File

@ -1,13 +0,0 @@
namespace Sandbox.UI;
public class HoverInfoPanelBase : WorldPanel
{
[Property] public string Label { get; set; } = "Описание";
[Property] public bool Visible { get; set; } = false;
public HoverInfoPanelBase(SceneWorld world) : base(world)
{
PanelBounds = new Rect(-200, -100, 400, 200);
WorldScale = 0.05f;
}
}

View File

@ -0,0 +1,87 @@
using Sandbox.Diagnostics;
namespace Sandbox.UI;
public abstract class InteractionButton : Component, Component.IPressable
{
[Property] public string Label { get; set; } = "Label";
[Property] public bool RequiresHold { get; set; } = false;
private HoverInfoPanel _uiPanel;
private GameObject _interactionPanelPrefab { get; set; }
protected override void OnStart()
{
base.OnStart();
_interactionPanelPrefab = GameObject.GetPrefab("prefabs/InteractionPanel.prefab");
Log.Info(_interactionPanelPrefab.Name);
Assert.True(_interactionPanelPrefab.IsValid(), $"No InteractionPanel prefab found for {GameObject.Name}!");
}
public virtual void Hover(IPressable.Event e)
{
CreatePanel();
}
public virtual void Blur(IPressable.Event e)
{
DestroyPanel();
}
public virtual void Look(IPressable.Event e)
{
if (_uiPanel != null)
{
_uiPanel.ProgressionHold = 0f;
}
}
public virtual bool CanPress( IPressable.Event e )
{
return true;
}
public virtual bool Press(IPressable.Event e)
{
if (_uiPanel != null)
{
_uiPanel?.SetPressed(true);
}
return true;
}
public virtual void Release(IPressable.Event e)
{
if (_uiPanel != null)
{
_uiPanel?.SetPressed(false);
}
}
protected void CreatePanel()
{
if (_uiPanel != null) return;
var panelGo = _interactionPanelPrefab.Clone();
panelGo.WorldPosition = WorldPosition;
panelGo.Parent = Scene;
_uiPanel = panelGo.Components.Get<HoverInfoPanel>();
if (_uiPanel != null)
{
_uiPanel.InteractionString = Label;
_uiPanel.IsHoldInteraction = RequiresHold;
_uiPanel.ProgressionHold = 0f;
}
}
protected async void DestroyPanel()
{
if (_uiPanel == null) return;
_uiPanel.GameObject.Destroy();
_uiPanel = null;
await Task.DelaySeconds(0.05f);
}
}

View File

@ -0,0 +1,22 @@
namespace Sandbox.UI;
[Icon("skip_next")]
public sealed class MusicPlayerNextButton : InteractionButton
{
[Property] public MyMusicPlayer MusicPlayer { get; set; }
public override bool Press(IPressable.Event e)
{
base.Press(e);
DoNextRpc(); // вызываем RPC отдельно из за того что в базовом классе абстракт и RPC там не работают
return true;
}
[Rpc.Broadcast]
private void DoNextRpc()
{
Log.Info("PRESSED");
MusicPlayer?.Next();
}
}

View File

@ -1,24 +0,0 @@
.interaction-panel {
padding: 8px;
background-color: rgba(0,0,0,0.7);
border-radius: 6px;
color: white;
font-size: 16px;
.label {
margin-bottom: 4px;
}
.progress-bar {
width: 100px;
height: 8px;
background-color: #333;
border-radius: 4px;
.progress-fill {
height: 100%;
background-color: limegreen;
border-radius: 4px;
}
}
&.interacted {
background-color: rgba(0, 128, 255, 0.6);
}
}

View File

@ -223,6 +223,13 @@
"Title": null, "Title": null,
"KeyboardCode": "MOUSE4", "KeyboardCode": "MOUSE4",
"GamepadCode": "None" "GamepadCode": "None"
},
{
"Name": "Dance",
"GroupName": "Other",
"Title": null,
"KeyboardCode": "T",
"GamepadCode": "None"
} }
], ],
"__guid": "9e933411-852b-4ab7-86fd-7b0253220965", "__guid": "9e933411-852b-4ab7-86fd-7b0253220965",

View File

@ -1,7 +1,7 @@
{ {
"Title": "sasalka", "Title": "sasalka",
"Type": "game", "Type": "game",
"Org": "local", "Org": "kptl",
"Ident": "sasalka", "Ident": "sasalka",
"Schema": 1, "Schema": 1,
"IncludeSourceFiles": false, "IncludeSourceFiles": false,

View File

@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=A_003A_005CSteamLibrary_005Csteamapps_005Ccommon_005Csbox_005Cbin_005Cmanaged_005CSandbox_002EGame_002Edll/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/AddReferences/RecentPaths/=A_003A_005CSteamLibrary_005Csteamapps_005Ccommon_005Csbox_005Cbin_005Cmanaged_005CSandbox_002EGame_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcdd7996c168e4e71a26a18071188e963140000_003F79_003F09b4d72b_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAudioProcessor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F8e_003Ff5fe4067_003FAudioProcessor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAudioProcessor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F8e_003Ff5fe4067_003FAudioProcessor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABaseSoundComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F03_003Fc9a9d7b5_003FBaseSoundComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABaseSoundComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F03_003Fc9a9d7b5_003FBaseSoundComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACharacterController_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003Ff4_003Ff6cf3340_003FCharacterController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACharacterController_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003Ff4_003Ff6cf3340_003FCharacterController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@ -18,6 +19,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARigidbodyFlags_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F2e_003Fd4632dba_003FRigidbodyFlags_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARigidbodyFlags_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F2e_003Fd4632dba_003FRigidbodyFlags_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARigidbody_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F55_003Fc86ceaad_003FRigidbody_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARigidbody_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F55_003Fc86ceaad_003FRigidbody_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTrace_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F23_003F2911a771_003FSceneTrace_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTrace_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F23_003F2911a771_003FSceneTrace_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASkinnedModelRenderer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F78_003Fd854339f_003FSkinnedModelRenderer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundEvent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F5f_003F9ff69285_003FSoundEvent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundEvent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F5f_003F9ff69285_003FSoundEvent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundHandle_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F58_003F780d4494_003FSoundHandle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundHandle_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003F58_003F780d4494_003FSoundHandle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundPointComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F4e_003F05785f2a_003FSoundPointComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASoundPointComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F4e_003F05785f2a_003FSoundPointComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>