Dev 0.1
* Structure de l'histoire principale * Line sur le perso principal * Agrandissement de la zone de détection des cellules * Ajout du spray de Talion (+1 points de plante de base) * Ajout de feedback sur l'usage des cellules d'énergie
This commit is contained in:
252
entities/interactable_3d/3d_door/3d_door.tscn
Normal file
252
entities/interactable_3d/3d_door/3d_door.tscn
Normal file
@@ -0,0 +1,252 @@
|
||||
[gd_scene format=3 uid="uid://cypsoytvytdup"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cah00gew65ire" path="res://entities/interactable_3d/3d_door/assets/3d/door.blend" id="1_7a6nb"]
|
||||
[ext_resource type="Script" uid="uid://u6dj6ud4mvk7" path="res://entities/interactable_3d/3d_door/scripts/3d_door.gd" id="1_08fm6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cc7uo5xqcplu8" path="res://entities/interactable_3d/3d_door/assets/3d/door_closed.blend" id="2_xjn0l"]
|
||||
[ext_resource type="Texture2D" uid="uid://1ynlp05wj0hm" path="res://common/icons/rocket.svg" id="5_3uc8q"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_08fm6"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("door:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("door_closed:visible")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Icon:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Icon2:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Icon:scale")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(1.5, 1.5, 1.5)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Icon2:scale")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(1.5, 1.5, 1.5)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3uc8q"]
|
||||
resource_name = "activated"
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("door:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("door_closed:visible")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Icon:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Icon2:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7o3sc"]
|
||||
resource_name = "deactivated"
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("door:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("door_closed:visible")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Icon2:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Icon:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_p35e2"]
|
||||
resource_name = "hover"
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Icon:scale")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.46666667, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(1.5, 1.5, 1.5), Vector3(2, 2, 2), Vector3(1.5, 1.5, 1.5)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Icon2:scale")
|
||||
tracks/1/interp = 2
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.46666667, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(1.5, 1.5, 1.5), Vector3(2, 2, 2), Vector3(1.5, 1.5, 1.5)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p35e2"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_08fm6"),
|
||||
&"activated": SubResource("Animation_3uc8q"),
|
||||
&"deactivated": SubResource("Animation_7o3sc"),
|
||||
&"hover": SubResource("Animation_p35e2")
|
||||
}
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_g4v7s"]
|
||||
size = Vector3(1, 5.1875, 5.140625)
|
||||
|
||||
[node name="3dDoor" type="Area3D" unique_id=814731756 node_paths=PackedStringArray("hover_animation_player")]
|
||||
script = ExtResource("1_08fm6")
|
||||
interactable = false
|
||||
hover_animation_player = NodePath("AnimationPlayer")
|
||||
|
||||
[node name="door" parent="." unique_id=48771245 instance=ExtResource("1_7a6nb")]
|
||||
|
||||
[node name="door_closed" parent="." unique_id=366011214 instance=ExtResource("2_xjn0l")]
|
||||
visible = false
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=545958515]
|
||||
libraries/ = SubResource("AnimationLibrary_p35e2")
|
||||
|
||||
[node name="Icon" type="Sprite3D" parent="." unique_id=368585741]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-6.556708e-08, 0, -1.5, 0, 1.5, 0, 1.5, 0, -6.556708e-08, 0.1830883, -0.8157884, 0.62879825)
|
||||
texture = ExtResource("5_3uc8q")
|
||||
|
||||
[node name="Icon2" type="Sprite3D" parent="." unique_id=286944398]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-6.556708e-08, 0, -1.5, 0, 1.5, 0, 1.5, 0, -6.556708e-08, -0.15410006, -0.8157884, 0.62879825)
|
||||
flip_h = true
|
||||
texture = ExtResource("5_3uc8q")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1859296170]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0390625, -0.03125)
|
||||
shape = SubResource("BoxShape3D_g4v7s")
|
||||
BIN
entities/interactable_3d/3d_door/assets/3d/door.blend
Normal file
BIN
entities/interactable_3d/3d_door/assets/3d/door.blend
Normal file
Binary file not shown.
71
entities/interactable_3d/3d_door/assets/3d/door.blend.import
Normal file
71
entities/interactable_3d/3d_door/assets/3d/door.blend.import
Normal file
@@ -0,0 +1,71 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cah00gew65ire"
|
||||
path="res://.godot/imported/door.blend-eece18402c8800106d851ddc37f797c8.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/interactable_3d/3d_door/assets/3d/door.blend"
|
||||
dest_files=["res://.godot/imported/door.blend-eece18402c8800106d851ddc37f797c8.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
mesh_library/use_node_names_as_mesh_names=false
|
||||
array_mesh/deduplicate_surfaces=true
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Default3D": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/vertex_colors=2
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
gltf/texture_map_mode=0
|
||||
BIN
entities/interactable_3d/3d_door/assets/3d/door.blend1
Normal file
BIN
entities/interactable_3d/3d_door/assets/3d/door.blend1
Normal file
Binary file not shown.
BIN
entities/interactable_3d/3d_door/assets/3d/door_closed.blend
Normal file
BIN
entities/interactable_3d/3d_door/assets/3d/door_closed.blend
Normal file
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cc7uo5xqcplu8"
|
||||
path="res://.godot/imported/door_closed.blend-507164d9450864a513b7fc7bb246c74c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/interactable_3d/3d_door/assets/3d/door_closed.blend"
|
||||
dest_files=["res://.godot/imported/door_closed.blend-507164d9450864a513b7fc7bb246c74c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
mesh_library/use_node_names_as_mesh_names=false
|
||||
array_mesh/deduplicate_surfaces=true
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Default3D": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/vertex_colors=1
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
gltf/texture_map_mode=1
|
||||
BIN
entities/interactable_3d/3d_door/assets/3d/door_closed.blend1
Normal file
BIN
entities/interactable_3d/3d_door/assets/3d/door_closed.blend1
Normal file
Binary file not shown.
21
entities/interactable_3d/3d_door/scripts/3d_door.gd
Normal file
21
entities/interactable_3d/3d_door/scripts/3d_door.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends Interactable3D
|
||||
class_name Door3d
|
||||
|
||||
@export var to_scene : Scene : set = set_to_scene
|
||||
|
||||
func _ready():
|
||||
set_to_scene()
|
||||
interactable = interactable
|
||||
|
||||
func set_to_scene(v : Scene = to_scene):
|
||||
to_scene = v
|
||||
if is_node_ready() and to_scene:
|
||||
%Icon.texture = to_scene.get_scene_icon()
|
||||
%Icon2.texture = to_scene.get_scene_icon()
|
||||
|
||||
func click():
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
if to_scene:
|
||||
SceneManager.change_to_scene(to_scene)
|
||||
1
entities/interactable_3d/3d_door/scripts/3d_door.gd.uid
Normal file
1
entities/interactable_3d/3d_door/scripts/3d_door.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://u6dj6ud4mvk7
|
||||
@@ -3,6 +3,7 @@
|
||||
[ext_resource type="Script" uid="uid://b25sqd4v2i3v2" path="res://entities/interactables/energy_cell/scripts/energy_cell.gd" id="1_nheea"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds65vxsiitxit" path="res://entities/interactables/energy_cell/assets/sprites/energy_cell_on.png" id="2_fnyaf"]
|
||||
[ext_resource type="Texture2D" uid="uid://dh6jdqoy2xu65" path="res://entities/interactables/energy_cell/assets/sprites/energy_cell_off.png" id="3_t6ydv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="4_fnyaf"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ylpt4"]
|
||||
radius = 39.115215
|
||||
@@ -100,3 +101,10 @@ shape = SubResource("CircleShape2D_ylpt4")
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1320210428]
|
||||
unique_name_in_owner = true
|
||||
libraries/ = SubResource("AnimationLibrary_d2c63")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1285579466]
|
||||
|
||||
[node name="EnergyParticle" type="Sprite2D" parent="CanvasLayer" unique_id=786670396]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(100, 100)
|
||||
texture = ExtResource("4_fnyaf")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
@tool
|
||||
extends Interactable
|
||||
class_name EnergyCell
|
||||
|
||||
@@ -8,6 +7,7 @@ const GIVEN_ENERGY = 1
|
||||
|
||||
func _ready():
|
||||
set_used()
|
||||
%EnergyParticle.visible = false
|
||||
|
||||
func set_used(v = used):
|
||||
used = v
|
||||
@@ -18,6 +18,11 @@ func set_used(v = used):
|
||||
%SpriteOff.visible = used
|
||||
%SpriteOn.visible = not used
|
||||
|
||||
func pointer_text() -> String:
|
||||
if used:
|
||||
return tr("%s_USED") % tr(default_info_title)
|
||||
return default_info_title
|
||||
|
||||
func can_interact(p : Player) -> bool:
|
||||
return p.data.energy < p.data.max_energy
|
||||
|
||||
@@ -26,13 +31,30 @@ func interact(p : Player) -> bool:
|
||||
used = true
|
||||
available = false
|
||||
|
||||
await spawn_energy_particle()
|
||||
|
||||
p.data.energy += GIVEN_ENERGY
|
||||
|
||||
interacted.emit(p)
|
||||
|
||||
region.data.used_objects.append(name)
|
||||
|
||||
AudioManager.play_sfx("Recharge1")
|
||||
|
||||
return true
|
||||
return false
|
||||
|
||||
func spawn_energy_particle():
|
||||
var screen_size = get_viewport().get_visible_rect().size
|
||||
%EnergyParticle.visible = true
|
||||
%EnergyParticle.position = (
|
||||
(global_position - region.camera.global_position) * get_viewport().get_camera_2d().zoom
|
||||
+ ((screen_size) / 2)
|
||||
)
|
||||
|
||||
var tween = create_tween()
|
||||
tween.set_trans(Tween.TransitionType.TRANS_SPRING)
|
||||
tween.tween_property(%EnergyParticle,"position",Vector2(100,100),1.)
|
||||
|
||||
await tween.finished
|
||||
|
||||
AudioManager.play_sfx("Recharge1")
|
||||
%EnergyParticle.visible = false
|
||||
|
||||
@@ -18,6 +18,11 @@ func set_used(v = used):
|
||||
%SpriteOff.visible = used
|
||||
%SpriteOn.visible = not used
|
||||
|
||||
func pointer_text() -> String:
|
||||
if used:
|
||||
return tr("%s_USED") % tr(default_info_title)
|
||||
return default_info_title
|
||||
|
||||
func interact(p : Player) -> bool:
|
||||
if not used and region:
|
||||
used = true
|
||||
|
||||
BIN
entities/player/assets/sprites/robot_big_line.png
Normal file
BIN
entities/player/assets/sprites/robot_big_line.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 424 KiB |
40
entities/player/assets/sprites/robot_big_line.png.import
Normal file
40
entities/player/assets/sprites/robot_big_line.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cwjixsd8nssnl"
|
||||
path="res://.godot/imported/robot_big_line.png-5ca66c48d2c95407c22b892fe8eab474.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/sprites/robot_big_line.png"
|
||||
dest_files=["res://.godot/imported/robot_big_line.png-5ca66c48d2c95407c22b892fe8eab474.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
entities/player/assets/sprites/robot_big_line.png~
Normal file
BIN
entities/player/assets/sprites/robot_big_line.png~
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 312 KiB |
@@ -15,9 +15,9 @@ const DOOR_ICON = preload("res://common/icons/logout.svg")
|
||||
const PLANT_ICON = preload("res://common/icons/seedling.svg")
|
||||
const SOUND_SOURCE : AudioStreamMP3 = preload("res://common/audio_manager/assets/sfx/signal/signal.mp3")
|
||||
const SOUND_BASE_PITCH = 1.
|
||||
const SOUND_NIVEL_LEVEL = 6
|
||||
const SOUND_NIVEL_LEVEL = 8
|
||||
|
||||
const CELL_DETECTION_MAX_DISTANCE = 2000.
|
||||
const CELL_DETECTION_MAX_DISTANCE = 3000.
|
||||
const CELL_DETECTION_COLOR : Color = Color("#ff006e")
|
||||
const CELL_DETECTION_MAX_PITCH = 1.5
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[ext_resource type="Script" uid="uid://das7twcy5153p" path="res://entities/player/scripts/player.gd" id="1_abrql"]
|
||||
[ext_resource type="Texture2D" uid="uid://dompaj451gklw" path="res://entities/player/assets/sprites/movement_particles.png" id="2_bls4j"]
|
||||
[ext_resource type="Texture2D" uid="uid://ys5fis3gsnoy" path="res://entities/player/assets/sprites/shadow.png" id="2_fkugw"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7ff87jniga5m" path="res://entities/player/assets/sprites/robot.png" id="4_bls4j"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwjixsd8nssnl" path="res://entities/player/assets/sprites/robot_big_line.png" id="3_26q78"]
|
||||
[ext_resource type="Texture2D" uid="uid://drgl0d51d4cf7" path="res://entities/player/assets/sprites/radial-gradient.png" id="5_8fjmc"]
|
||||
[ext_resource type="Script" uid="uid://b1mmtgmi5oq86" path="res://entities/player/scripts/player_sprite.gd" id="5_fkugw"]
|
||||
[ext_resource type="Texture2D" uid="uid://51255tpyl6vj" path="res://common/icons/no-bolt.svg" id="7_26q78"]
|
||||
@@ -27,101 +27,101 @@ fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(0.5, 0)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fkugw"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(3048, 0, 762, 1080)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8fjmc"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(3810, 0, 762, 1080)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qiwj3"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(2286, 0, 762, 1080)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_26q78"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(0, 0, 762, 1080)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bectd"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(5334, 0, 762, 1080)
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(1388, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wvtmh"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(762, 0, 762, 1080)
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(1735, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7thud"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(4572, 0, 762, 1080)
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(1041, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a1qjk"]
|
||||
atlas = ExtResource("4_bls4j")
|
||||
region = Rect2(1524, 0, 762, 1080)
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(0, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j3ovn"]
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(2429, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_afbqv"]
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(347, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gx6sm"]
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(2082, 0, 347, 347)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yqrof"]
|
||||
atlas = ExtResource("3_26q78")
|
||||
region = Rect2(694, 0, 347, 347)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_a1qjk"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fkugw")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"back",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8fjmc")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"back_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qiwj3")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"back_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_26q78")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"front",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bectd")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"front_left",
|
||||
"loop": 1,
|
||||
"name": &"back",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wvtmh")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"front_right",
|
||||
"loop": 1,
|
||||
"name": &"back_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_7thud")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"left",
|
||||
"loop": 1,
|
||||
"name": &"back_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a1qjk")
|
||||
}],
|
||||
"loop": true,
|
||||
"loop": 1,
|
||||
"name": &"front",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j3ovn")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"front_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_afbqv")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"front_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gx6sm")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yqrof")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"right",
|
||||
"speed": 5.0
|
||||
}]
|
||||
@@ -130,7 +130,7 @@ animations = [{
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fkugw"]
|
||||
_data = [Vector2(0, 0.14473677), 0.0, 0.0, 0, 0, Vector2(0.972549, 0.2654798), 0.0, 0.0, 0, 0]
|
||||
_data = [Vector2(0.006711416, 0.21238941), 0.0, 0.0, 0, 0, Vector2(1, 0.5083333), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_bls4j"]
|
||||
@@ -142,7 +142,7 @@ length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position:y")
|
||||
tracks/0/path = NodePath(".:offset:y")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
@@ -157,12 +157,12 @@ loop_mode = 1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position:y")
|
||||
tracks/0/path = NodePath(".:offset:y")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(2, 2),
|
||||
"points": PackedFloat32Array(-1097.2793, 0, 0, 0, -139.75659, -1097.2793, 0, -112.66321, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.24854341, 55.161533, 0.2, -44.387848, 0, -0.23333335, -52.649887, 0, 0),
|
||||
"times": PackedFloat32Array(0, 1)
|
||||
}
|
||||
|
||||
@@ -314,13 +314,13 @@ texture = SubResource("GradientTexture2D_26q78")
|
||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0.99999994, -17)
|
||||
scale = Vector2(0.0656168, 0.065616846)
|
||||
scale = Vector2(0.221, 0.221)
|
||||
sprite_frames = SubResource("SpriteFrames_a1qjk")
|
||||
animation = &"front_left"
|
||||
frame_progress = 0.15805355
|
||||
offset = Vector2(0, -370)
|
||||
animation = &"left"
|
||||
frame_progress = 0.2383069
|
||||
offset = Vector2(0, -150)
|
||||
script = ExtResource("5_fkugw")
|
||||
wanted_orientation = 2
|
||||
wanted_orientation = 7
|
||||
|
||||
[node name="Light" type="Sprite2D" parent="PlayerSprite" unique_id=1768327734]
|
||||
modulate = Color(0.70603025, 0.5959886, 0.33971557, 0.09019608)
|
||||
@@ -331,8 +331,7 @@ texture = ExtResource("5_8fjmc")
|
||||
|
||||
[node name="CPUParticles2D" type="CPUParticles2D" parent="PlayerSprite" unique_id=1489736082]
|
||||
z_index = -1
|
||||
position = Vector2(-15.239999, -60.95996)
|
||||
scale = Vector2(3.4752407, 3.4752383)
|
||||
position = Vector2(-4.5248866, -46.816402)
|
||||
amount = 3
|
||||
texture = ExtResource("2_bls4j")
|
||||
lifetime = 0.4
|
||||
@@ -343,8 +342,8 @@ color_ramp = SubResource("Gradient_bls4j")
|
||||
[node name="NoEnergyLeftIcon" type="Sprite2D" parent="PlayerSprite" unique_id=1059424679]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 0, 0.43137255, 1)
|
||||
position = Vector2(-15.239998, 0)
|
||||
scale = Vector2(10.16, 10.16)
|
||||
position = Vector2(-4.5248866, -377.13315)
|
||||
scale = Vector2(3, 3)
|
||||
texture = ExtResource("7_26q78")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="PlayerSprite/NoEnergyLeftIcon" unique_id=390014722]
|
||||
|
||||
@@ -124,6 +124,7 @@ horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="." unique_id=1470634574]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.66324395, 0)
|
||||
amount = 5
|
||||
mesh = SubResource("PlaneMesh_0oeag")
|
||||
|
||||
@@ -7,6 +7,7 @@ const POINTER_ACTION_TEXTURE = preload("res://common/icons/hand-finger.svg")
|
||||
@export var pointer_texture_rect : TextureRect
|
||||
|
||||
@export var speed := 4.0
|
||||
@export var gravity_factor = 1.
|
||||
const MOUSE_SENSIVITY = 0.002
|
||||
const RAY_LENGTH = 10.
|
||||
const PUSH_FORCE = 0.6
|
||||
@@ -85,9 +86,11 @@ func _physics_process(delta):
|
||||
else :
|
||||
velocity = Vector3.ZERO
|
||||
|
||||
%CPUParticles3D.emitting = is_on_floor()
|
||||
|
||||
# Add the gravity.
|
||||
if not is_on_floor():
|
||||
velocity += get_gravity() * delta
|
||||
velocity += get_gravity() * gravity_factor * delta
|
||||
|
||||
move_and_slide()
|
||||
for i in get_slide_collision_count():
|
||||
|
||||
Reference in New Issue
Block a user