| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/animal_mask.glb" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="asset_animal_mask" type="Spatial"] | |
| 6 | ||
| 7 | [node name="animal_mask" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/laughgoblin.glb" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="asset_laughing_goblin" type="Spatial"] | |
| 6 | ||
| 7 | [node name="laughgoblin" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/ratface.glb" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="asset_ratface" type="Spatial"] | |
| 6 | ||
| 7 | [node name="ratface" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/skull.glb" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="asset_skull" type="Spatial"] | |
| 6 | ||
| 7 | [node name="skull" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/asset_animal_mask.tscn" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="mask_animal" type="Spatial"] | |
| 6 | ||
| 7 | [node name="asset_animal_mask" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/asset_laughing_goblin.tscn" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="mask_laughing_goblin" type="Spatial"] | |
| 6 | ||
| 7 | [node name="asset_laughing_goblin" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/asset_ratface.tscn" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="mask_ratface" type="Spatial"] | |
| 6 | ||
| 7 | [node name="asset_ratface" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -0,0 +1,7 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://assets/masks/asset_skull.tscn" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="mask_skull" type="Spatial"] | |
| 6 | ||
| 7 | [node name="asset_skull" parent="." instance=ExtResource( 1 )] |
| … | … | @@ -2,6 +2,11 @@ extends KinematicBody |
| 2 | 2 | |
| 3 | 3 | var hyperGossip : HyperGossip |
| 4 | 4 | |
| 5 | const maskAnimal = preload("res://game/player/masks/mask_animal.tscn") | |
| 6 | const maskLaughingGoblin = preload("res://game/player/masks/mask_laughing_goblin.tscn") | |
| 7 | const maskRatface = preload("res://game/player/masks/mask_ratface.tscn") | |
| 8 | const maskSkull = preload("res://game/player/masks/mask_skull.tscn") | |
| 9 | ||
| 5 | 10 | # TODO : These probably should not be in player_core, though I am uncertain yet if they belong elsewhere |
| 6 | 11 | const EVENT_PLAYER_SNAPSHOT = 'player_snapshot' |
| 7 | 12 | const EVENT_PLAYER_WANTSTOJUMP = 'player_wantstojump' |
| … | … | @@ -24,10 +29,11 @@ export var currentSpeed : float = 0 |
| 24 | 29 | onready var meshNode : Spatial = $Model |
| 25 | 30 | |
| 26 | 31 | # Skeleton-specific VARs |
| 27 | #onready var meshSkeletonNode : Skeleton = $Model/Armature/Skeleton | |
| 28 | #onready var meshSkeletonHiddenHand : MeshInstance = $Model/Armature/Skeleton/player001 | |
| 29 | #onready var meshHandBone : int = meshSkeletonNode.find_bone("DEF-hand.R") | |
| 30 | #onready var meshHandBonePos : Transform = meshSkeletonNode.get_bone_pose(meshHandBone) | |
| 32 | onready var meshSkeletonNode : Skeleton = $Model/rig/Skeleton | |
| 33 | onready var meshSkeletonHiddenHand : MeshInstance = $Model/rig/Skeleton/player000 | |
| 34 | onready var meshFaceBone : int = meshSkeletonNode.find_bone("DEF-spine.006") | |
| 35 | onready var meshFaceBonePos : Transform = meshSkeletonNode.get_bone_pose(meshFaceBone) | |
| 36 | onready var meshMaskAttachment : BoneAttachment = $Model/rig/Skeleton/MaskAttachment | |
| 31 | 37 | |
| 32 | 38 | onready var clippedCamera : Spatial = $CameraHead/CameraPivot/ClippedCamera |
| 33 | 39 | onready var clippedCameraHead : Spatial = $CameraHead |
| … | … | @@ -80,6 +86,9 @@ func _ready(): |
| 80 | 86 | # Get HyperGossip |
| 81 | 87 | hyperGossip = get_tree().get_current_scene().get_node("HyperGodot").get_node("HyperGossip") |
| 82 | 88 | |
| 89 | var newMask = maskAnimal.instance() | |
| 90 | meshMaskAttachment.add_child(newMask) | |
| 91 | ||
| 83 | 92 | func snapShotUpdate(_translation : Vector3, _meshDirection : Vector3, _lookingDirection : Vector3): |
| 84 | 93 | self.translation = _translation |
| 85 | 94 | self.meshNode.rotation = _meshDirection |
| … | … | @@ -8,7 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | [node name="PlayerCoreLocal" instance=ExtResource( 1 )] |
| 10 | 10 | |
| 11 | [node name="Sound_Shoot_GrapplingHook_1" parent="Model" index="8"] | |
| 11 | [node name="Sound_Shoot_GrapplingHook_1" parent="Model" index="9"] | |
| 12 | 12 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 ) |
| 13 | 13 | stream = ExtResource( 9 ) |
| 14 | 14 | attenuation_filter_cutoff_hz = 5000.0 |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 ) |
| 187 | 187 | nodes/walk_scale/position = Vector2( -640, 360 ) |
| 188 | 188 | nodes/wall_run/node = SubResource( 50 ) |
| 189 | 189 | nodes/wall_run/position = Vector2( 720, -60 ) |
| 190 | node_connections = [ "output", 0, "wall_run", "landing_scale", 0, "Animation 7", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "run_scale", 0, "Animation 4", "jump_scale", 0, "jump", "falling_scale", 0, "Animation 6", "walk_scale", 0, "Animation 3", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "TimeScale 3", 0, "strafe", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "roll", 0, "air_transition", "roll", 1, "roll_scale", "roll_scale", 0, "Animation", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll" ] | |
| 190 | node_connections = [ "output", 0, "wall_run", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "roll", 0, "air_transition", "roll", 1, "roll_scale", "roll_scale", 0, "Animation", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "TimeScale 3", 0, "strafe", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "falling_scale", 0, "Animation 6", "jump_scale", 0, "jump", "walk_scale", 0, "Animation 3", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "landing_scale", 0, "Animation 7", "run_scale", 0, "Animation 4" ] |