Final Game Jam version
This commit is contained in:
parent
35ce267482
commit
104a1e4297
141 changed files with 4485 additions and 206 deletions
|
|
@ -1,10 +1,134 @@
|
|||
class_name Character extends Node3D
|
||||
|
||||
@onready var shotAnimations = $Shots/shotAnimations
|
||||
@onready var gunAnimations = $gun/gunAnimations
|
||||
@onready var gunPosition1 = $GunPositions/GunPosition1
|
||||
@onready var gunPosition2 = $GunPositions/GunPosition2
|
||||
@onready var gunPosition3 = $GunPositions/GunPosition3
|
||||
@onready var gunPosition4 = $GunPositions/GunPosition4
|
||||
@onready var shotGlas1 = $Shots/ShotGlas1
|
||||
@onready var shotGlas2 = $Shots/ShotGlas2
|
||||
@onready var shotGlas3 = $Shots/ShotGlas3
|
||||
@onready var gameNameLabel = $gameNameLabel
|
||||
|
||||
@onready var gun = $gun
|
||||
|
||||
@onready var headPosition = $HeadPosition
|
||||
|
||||
@onready var shots = $Shots
|
||||
|
||||
func shoot():
|
||||
pass
|
||||
@onready var shootAudio = $GunPositions/GunPosition1/shootAudio
|
||||
@onready var triggerAudio = $gun/triggerAudio
|
||||
|
||||
func removeShot() -> void:
|
||||
print("remove Shot")
|
||||
shots.get_child(0).queue_free()
|
||||
signal shootGunFinished
|
||||
signal addGunToPoolFinished
|
||||
signal aimGunFinished
|
||||
signal shotDrinkingFinished
|
||||
|
||||
func shootGun(hit: bool):
|
||||
var currentRotationDegrees = gun.rotation_degrees
|
||||
var currentPosition = gun.position
|
||||
var tween1 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_OUT)
|
||||
var tween2 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_OUT)
|
||||
triggerAudio.play()
|
||||
if hit:
|
||||
shootAudio.play()
|
||||
gunAnimations.play("shoot")
|
||||
tween1.finished.connect(emitShootGunFinished.bind())
|
||||
tween2.tween_property(gun, "position", gun.position+Vector3(0,0,-0.2), 0.2)
|
||||
tween1.tween_property(gun, "rotation_degrees", gun.rotation_degrees+Vector3(-10,0,0), 0.2)
|
||||
tween2.tween_property(gun, "position", currentPosition, 1).set_trans(Tween.TRANS_QUART)
|
||||
tween1.tween_property(gun, "rotation_degrees", currentRotationDegrees, 1).set_trans(Tween.TRANS_QUART)
|
||||
else:
|
||||
tween2.finished.connect(emitShootGunFinished.bind())
|
||||
tween2.tween_property(gun, "position", gun.position+Vector3(-0.01,-0.01,-0.01), 0.2).set_trans(Tween.TRANS_BOUNCE)
|
||||
#tween1.tween_property(gun, "rotation_degrees", gun.rotation_degrees+Vector3(10,0,0), 0.2).set_trans(Tween.TRANS_BOUNCE)
|
||||
tween2.tween_property(gun, "position", currentPosition, 1).set_trans(Tween.TRANS_QUART)
|
||||
#tween1.tween_property(gun, "rotation_degrees", currentRotationDegrees, 1).set_trans(Tween.TRANS_QUART)
|
||||
|
||||
func emitShootGunFinished():
|
||||
shootGunFinished.emit()
|
||||
|
||||
|
||||
func addGunToPool():
|
||||
var tween1 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
var tween2 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
tween1.finished.connect(emitAddGunToPoolFinished.bind())
|
||||
tween2.tween_property(gun, "position", gunPosition3.position, 0.6)
|
||||
tween1.tween_property(gun, "rotation_degrees", gunPosition3.rotation_degrees, 0.6)
|
||||
tween2.tween_property(gun, "position", gunPosition3.position, 1)
|
||||
tween1.tween_property(gun, "rotation_degrees", gunPosition3.rotation_degrees, 1)
|
||||
tween2.tween_property(gun, "position", gunPosition1.position, 0.6)
|
||||
tween1.tween_property(gun, "rotation_degrees", gunPosition1.rotation_degrees, 0.6)
|
||||
|
||||
func emitAddGunToPoolFinished():
|
||||
addGunToPoolFinished.emit()
|
||||
|
||||
func aimGun():
|
||||
var tween1 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
var tween2 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
tween1.finished.connect(emitAimGunFinished.bind())
|
||||
tween2.tween_property(gun, "position", gunPosition1.position, 0.6)
|
||||
tween1.tween_property(gun, "rotation_degrees", gunPosition1.rotation_degrees, 0.6)
|
||||
|
||||
func setAim(_player: Player):
|
||||
gunPosition1.look_at(Vector3(_player.character.getHeadPosition().x,_player.character.getHeadPosition().y,_player.character.getHeadPosition().z), Vector3.UP, true)
|
||||
|
||||
func resetAim():
|
||||
gunPosition1.rotation = Vector3(0,0,0)
|
||||
|
||||
func emitAimGunFinished():
|
||||
aimGunFinished.emit()
|
||||
|
||||
func loadGun():
|
||||
var tween1 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
var tween2 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
tween2.tween_property(gun, "position", gunPosition4.position, 0.6)
|
||||
tween1.tween_property(gun, "rotation_degrees", gunPosition4.rotation_degrees, 0.6)
|
||||
|
||||
|
||||
|
||||
#func aimGunAtPlayer(_player: Player):
|
||||
#gunPosition1.look_at(Vector3(_player.character.getHeadPosition().x,_player.character.getHeadPosition().y,_player.character.getHeadPosition().z), Vector3.UP, true)
|
||||
#moveGunTo(gunPosition1)
|
||||
|
||||
#func aimGunAtSelf():
|
||||
#moveGunTo(gunPosition2)
|
||||
|
||||
#func addGunToPool():
|
||||
#moveGunTo(gunPosition3)
|
||||
|
||||
#func removeGunToPool():
|
||||
#moveGunTo(gunPosition1)
|
||||
|
||||
func moveGunTo(toPosition: Marker3D):
|
||||
var tween1 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
var tween2 = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN)
|
||||
tween2.tween_property(gun, "position", toPosition.position, 0.6)
|
||||
tween1.tween_property(gun, "rotation_degrees", toPosition.rotation_degrees, 0.6)
|
||||
|
||||
#print("Finish")
|
||||
|
||||
#func aimGun(_player: Player):
|
||||
#var lookAt: Vector3 = gun.global_position
|
||||
#lookAt = _player.character.getHeadPosition()
|
||||
#gun.look_at(lookAt, Vector3.UP, true)
|
||||
|
||||
func drinkShot():
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
if shotGlas1 != null:
|
||||
shotAnimations.play("drinkShot1")
|
||||
elif shotGlas2 != null:
|
||||
shotAnimations.play("drinkShot2")
|
||||
elif shotGlas3 != null:
|
||||
shotAnimations.play("drinkShot3")
|
||||
|
||||
func getHeadPosition() -> Vector3:
|
||||
return headPosition.global_position
|
||||
|
||||
func _on_shot_animations_current_animation_changed(name: String) -> void:
|
||||
shotDrinkingFinished.emit()
|
||||
|
||||
|
||||
func setGameName(_name: String):
|
||||
gameNameLabel.text = _name
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dlsh4dfqgtvan"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://dlsh4dfqgtvan"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du3d2gb1rri4t" path="res://icon.svg" id="1_6nn2t"]
|
||||
[ext_resource type="Script" uid="uid://1uwdiveyijuu" path="res://scenes/character/character.gd" id="1_cuyo6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dtxymku41phdj" path="res://assets/player/player.png" id="2_bix7t"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhr8ggg3suw46" path="res://scenes/character/shotGlas/shotGlas.tscn" id="3_mutn8"]
|
||||
[ext_resource type="PackedScene" uid="uid://daj8ue8u3fjw6" path="res://scenes/character/gun/gun.tscn" id="4_fgi2k"]
|
||||
[ext_resource type="AudioStream" uid="uid://bb2odit8okuma" path="res://assets/audio/shoot2.wav" id="5_7ex5l"]
|
||||
[ext_resource type="AudioStream" uid="uid://d1plcwujuslyx" path="res://assets/audio/heal.wav" id="5_q52vl"]
|
||||
[ext_resource type="AudioStream" uid="uid://b1jqrw6p8mtwu" path="res://assets/audio/trigger.wav" id="6_7ex5l"]
|
||||
[ext_resource type="FontFile" uid="uid://bl6jbonkrdy03" path="res://assets/font/minecraft-font/MinecraftBold-nMK1.otf" id="8_bblvu"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cuyo6"]
|
||||
albedo_texture = ExtResource("1_6nn2t")
|
||||
|
|
@ -14,24 +20,386 @@ orientation = 2
|
|||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_cuyo6"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bix7t"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Shots/ShotGlas1:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(-0.3, 1.12, -0.8)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shots/ShotGlas1:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Shots/ShotGlas2:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 1.12, -0.8)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Shots/ShotGlas2:rotation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Shots/ShotGlas3:position")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.3, 1.12, -0.8)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Shots/ShotGlas3:rotation")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("Shots/healAudio:playing")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7ex5l"]
|
||||
resource_name = "drinkShot1"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Shots/ShotGlas1:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(-0.3, 1.12, -0.8), Vector3(0, 1.5, -1.1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shots/ShotGlas1:rotation")
|
||||
tracks/1/interp = 2
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5, 0.7),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(-0.523599, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Shots/ShotGlas1")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"queue_free"
|
||||
}]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Shots/healAudio:playing")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0.933333),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_f8hpl"]
|
||||
resource_name = "drinkShot2"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Shots/ShotGlas2:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 1.12, -0.8), Vector3(0, 1.5, -1.1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shots/ShotGlas2:rotation")
|
||||
tracks/1/interp = 2
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5, 0.7),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(-0.523599, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Shots/ShotGlas2")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"queue_free"
|
||||
}]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Shots/healAudio:playing")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0.933333),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bblvu"]
|
||||
resource_name = "drinkShot3"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Shots/ShotGlas3:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.3, 1.12, -0.8), Vector3(0, 1.5, -1.1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shots/ShotGlas3:rotation")
|
||||
tracks/1/interp = 2
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5, 0.7),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(-0.523599, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Shots/ShotGlas3")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"queue_free"
|
||||
}]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Shots/healAudio:playing")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0.933333),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_bblvu"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_bix7t"),
|
||||
&"drinkShot1": SubResource("Animation_7ex5l"),
|
||||
&"drinkShot2": SubResource("Animation_f8hpl"),
|
||||
&"drinkShot3": SubResource("Animation_bblvu")
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_l884r"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("../GunPositions/GunPosition1/DirectionalLight3D:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_q52vl"]
|
||||
resource_name = "shoot"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("../GunPositions/GunPosition1/DirectionalLight3D:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.05, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [false, true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_f8hpl"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_l884r"),
|
||||
&"shoot": SubResource("Animation_q52vl")
|
||||
}
|
||||
|
||||
[node name="Character" type="Node3D"]
|
||||
script = ExtResource("1_cuyo6")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -1.2)
|
||||
shaded = true
|
||||
double_sided = false
|
||||
texture_filter = 0
|
||||
texture = ExtResource("2_bix7t")
|
||||
|
||||
[node name="Character" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -1.2)
|
||||
visible = false
|
||||
mesh = SubResource("PlaneMesh_mutn8")
|
||||
|
||||
[node name="Chair" type="CSGMesh3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, -1.2)
|
||||
visible = false
|
||||
mesh = SubResource("BoxMesh_cuyo6")
|
||||
|
||||
[node name="Shots" type="Node3D" parent="."]
|
||||
|
||||
[node name="ShotGlas3" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.1, -0.8)
|
||||
[node name="ShotGlas1" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.12, -0.8)
|
||||
|
||||
[node name="ShotGlas2" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, -0.8)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.12, -0.8)
|
||||
|
||||
[node name="ShotGlas" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, 1.1, -0.8)
|
||||
[node name="ShotGlas3" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, 1.12, -0.8)
|
||||
|
||||
[node name="shotAnimations" type="AnimationPlayer" parent="Shots"]
|
||||
root_node = NodePath("../..")
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_bblvu")
|
||||
}
|
||||
|
||||
[node name="healAudio" type="AudioStreamPlayer" parent="Shots"]
|
||||
stream = ExtResource("5_q52vl")
|
||||
|
||||
[node name="gun" parent="." instance=ExtResource("4_fgi2k")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.3, -1)
|
||||
|
||||
[node name="gunAnimations" type="AnimationPlayer" parent="gun"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_f8hpl")
|
||||
}
|
||||
|
||||
[node name="triggerAudio" type="AudioStreamPlayer3D" parent="gun"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0.1)
|
||||
stream = ExtResource("6_7ex5l")
|
||||
|
||||
[node name="HeadPosition" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.4, -1.2)
|
||||
|
||||
[node name="GunPositions" type="Node3D" parent="."]
|
||||
|
||||
[node name="GunPosition1" type="Marker3D" parent="GunPositions"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.3, -1)
|
||||
|
||||
[node name="DirectionalLight3D" type="OmniLight3D" parent="GunPositions/GunPosition1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0.7)
|
||||
visible = false
|
||||
light_color = Color(1, 0.933333, 0, 1)
|
||||
light_energy = 2.0
|
||||
|
||||
[node name="shootAudio" type="AudioStreamPlayer3D" parent="GunPositions/GunPosition1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0.5)
|
||||
stream = ExtResource("5_7ex5l")
|
||||
volume_db = -15.0
|
||||
|
||||
[node name="GunPosition2" type="Marker3D" parent="GunPositions"]
|
||||
transform = Transform3D(-0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, -0.173648, -0.9, 1.42, -1)
|
||||
|
||||
[node name="GunPosition3" type="Marker3D" parent="GunPositions"]
|
||||
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, -0.0999999, 0.92, 3.72529e-08)
|
||||
|
||||
[node name="GunPosition4" type="Marker3D" parent="GunPositions"]
|
||||
transform = Transform3D(0.839491, 0.460136, 0.289014, -0.37369, 0.875034, -0.307686, -0.394475, 0.150298, 0.906531, 0.3, 1.3, -1.2)
|
||||
|
||||
[node name="GunPosition5" type="Marker3D" parent="GunPositions"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.96046e-08, 0.82, 0.2)
|
||||
|
||||
[node name="cameraRottion" type="Node3D" parent="."]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="gameNameLabel" type="Label3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, -1.2)
|
||||
visible = false
|
||||
text = "asdasd"
|
||||
font = ExtResource("8_bblvu")
|
||||
|
||||
[connection signal="current_animation_changed" from="Shots/shotAnimations" to="." method="_on_shot_animations_current_animation_changed"]
|
||||
|
|
|
|||
1
scenes/character/gun/gun.gd
Normal file
1
scenes/character/gun/gun.gd
Normal file
|
|
@ -0,0 +1 @@
|
|||
extends Node3D
|
||||
1
scenes/character/gun/gun.gd.uid
Normal file
1
scenes/character/gun/gun.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bndvv6x2gr7t
|
||||
30
scenes/character/gun/gun.tscn
Normal file
30
scenes/character/gun/gun.tscn
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://daj8ue8u3fjw6"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du3d2gb1rri4t" path="res://icon.svg" id="1_gpxws"]
|
||||
[ext_resource type="Texture2D" uid="uid://xbypphjmwif4" path="res://assets/revolver/revolver.png" id="2_l135f"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mutn8"]
|
||||
albedo_texture = ExtResource("1_gpxws")
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_fgi2k"]
|
||||
material = SubResource("StandardMaterial3D_mutn8")
|
||||
size = Vector2(0.6, 0.2)
|
||||
|
||||
[node name="gun" type="Node3D"]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0.1, 0.3)
|
||||
visible = false
|
||||
mesh = SubResource("QuadMesh_fgi2k")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1.31134e-07, 0, 1, 0, 1, 0, -1, 0, 1.31134e-07, 0, 0.1, 0.3)
|
||||
visible = false
|
||||
mesh = SubResource("QuadMesh_fgi2k")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.33227e-15, 0.1, 0.2)
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 2
|
||||
texture = ExtResource("2_l135f")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bhr8ggg3suw46"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du3d2gb1rri4t" path="res://icon.svg" id="1_k57fi"]
|
||||
[ext_resource type="Texture2D" uid="uid://bn4gu1d85c0nv" path="res://assets/shots/shot.png" id="1_k57fi"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tfdbf"]
|
||||
albedo_texture = ExtResource("1_k57fi")
|
||||
|
|
@ -12,8 +12,16 @@ size = Vector2(0.2, 0.2)
|
|||
[node name="ShotGlas" type="Node3D"]
|
||||
|
||||
[node name="Front" type="MeshInstance3D" parent="."]
|
||||
visible = false
|
||||
mesh = SubResource("QuadMesh_ix4wg")
|
||||
|
||||
[node name="Back" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
visible = false
|
||||
mesh = SubResource("QuadMesh_ix4wg")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 2
|
||||
texture = ExtResource("1_k57fi")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue