feat: implemented tactics markers and mode switching
This commit is contained in:
parent
7f2d67d9db
commit
f0185e64bc
15 changed files with 279 additions and 51 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://dpda341t6ipiv"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dpda341t6ipiv"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_7rmf4"]
|
||||
min_value = 0.2
|
||||
|
|
@ -6,6 +6,32 @@ max_value = 2.0
|
|||
_data = [Vector2(0.145299, 0.2), 0.0, 0.482143, 0, 0, Vector2(0.594017, 2), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="MoveStateArgs" id="MoveStateArgs_ibmkn"]
|
||||
argument_property = &"g_player_character"
|
||||
|
||||
[sub_resource type="Action" id="Action_gtisq"]
|
||||
effects = {
|
||||
"is_near_player": true
|
||||
}
|
||||
apply_state = SubResource("MoveStateArgs_ibmkn")
|
||||
|
||||
[sub_resource type="MoveStateArgs" id="MoveStateArgs_vyebd"]
|
||||
argument_property = &"target"
|
||||
|
||||
[sub_resource type="Action" id="Action_cwmvs"]
|
||||
effects = {
|
||||
"is_near_target": true
|
||||
}
|
||||
apply_state = SubResource("MoveStateArgs_vyebd")
|
||||
|
||||
[sub_resource type="Goal" id="Goal_sqtwb"]
|
||||
goal_state = {
|
||||
"is_near_player": true
|
||||
}
|
||||
prerequisites = {
|
||||
"is_near_player": false
|
||||
}
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3g72p"]
|
||||
height = 1.59321
|
||||
|
||||
|
|
@ -18,27 +44,14 @@ albedo_color = Color(0.94902, 0.909804, 0, 1)
|
|||
[sub_resource type="BoxMesh" id="BoxMesh_f5yvh"]
|
||||
size = Vector3(0.125, 0.14, 0.94)
|
||||
|
||||
[sub_resource type="MoveStateArgs" id="MoveStateArgs_ibmkn"]
|
||||
argument_property = &"g_player_character"
|
||||
|
||||
[sub_resource type="Action" id="Action_gtisq"]
|
||||
effects = {
|
||||
"is_near_player": true
|
||||
}
|
||||
apply_state = SubResource("MoveStateArgs_ibmkn")
|
||||
|
||||
[sub_resource type="Goal" id="Goal_sqtwb"]
|
||||
goal_state = {
|
||||
"is_near_player": true
|
||||
}
|
||||
prerequisites = {
|
||||
"is_near_player": false
|
||||
}
|
||||
|
||||
[node name="PlayerCharacter" type="CharacterActor"]
|
||||
rotation_speed_curve = SubResource("Curve_7rmf4")
|
||||
collision_layer = 7
|
||||
|
||||
[node name="Planner" type="Planner" parent="."]
|
||||
actions = [SubResource("Action_gtisq"), SubResource("Action_cwmvs")]
|
||||
goals = [SubResource("Goal_sqtwb")]
|
||||
|
||||
[node name="Health" type="Health" parent="."]
|
||||
max_health = 5
|
||||
|
||||
|
|
@ -64,7 +77,3 @@ surface_material_override/0 = SubResource("StandardMaterial3D_scmx3")
|
|||
|
||||
[node name="WeaponMuzzle" type="WeaponMuzzle" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.53551, 0.931313, 0)
|
||||
|
||||
[node name="Planner" type="Planner" parent="."]
|
||||
actions = [SubResource("Action_gtisq")]
|
||||
goals = [SubResource("Goal_sqtwb")]
|
||||
|
|
|
|||
|
|
@ -42,9 +42,15 @@ fire={
|
|||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
tactics_mode={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
3d_physics/layer_1="Default"
|
||||
3d_physics/layer_2="Vision"
|
||||
3d_physics/layer_3="Hitboxes"
|
||||
3d_physics/layer_4="Markers"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://m36guasmi3c1"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://m36guasmi3c1"]
|
||||
|
||||
[ext_resource type="TunnelsGameState" uid="uid://cl0iikkau5mio" path="res://tunnels_game_state.tres" id="1_aove2"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqkbxe758jr7p" path="res://player.tscn" id="2_6yx24"]
|
||||
|
|
@ -28,6 +28,23 @@ size = Vector3(20, 0.25, 20)
|
|||
[sub_resource type="BoxShape3D" id="BoxShape3D_kacqg"]
|
||||
size = Vector3(20, 0.25, 20)
|
||||
|
||||
[sub_resource type="Goal" id="Goal_jou2o"]
|
||||
goal_state = {
|
||||
"is_near_target": true
|
||||
}
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hp1wp"]
|
||||
height = 0.497374
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_navbx"]
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_oaw6a"]
|
||||
material = SubResource("StandardMaterial3D_navbx")
|
||||
top_radius = 1.0
|
||||
bottom_radius = 1.0
|
||||
height = 0.54
|
||||
|
||||
[node name="Level3D" type="Level3D"]
|
||||
game_mode_prototype = SubResource("TunnelsGameMode_hnap3")
|
||||
|
||||
|
|
@ -54,3 +71,15 @@ transform = Transform3D(-0.925514, 0, -0.378713, 0, 1, 0, 0.378713, 0, -0.925514
|
|||
|
||||
[node name="PlayerCharacter" parent="." instance=ExtResource("4_22npn")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.12963, 0.125, -3.38872)
|
||||
|
||||
[node name="GoalMarker" type="GoalMarker" parent="."]
|
||||
goal = SubResource("Goal_jou2o")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.0795, 0, -6.23068)
|
||||
collision_layer = 8
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="GoalMarker"]
|
||||
shape = SubResource("CylinderShape3D_hp1wp")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="GoalMarker"]
|
||||
mesh = SubResource("CylinderMesh_oaw6a")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue