First Commit

This commit is contained in:
2026-05-24 17:10:09 -03:00
commit 0b0113fbde
222 changed files with 67094 additions and 0 deletions
@@ -0,0 +1,106 @@
extends Node3D
## Emitted when Gobot's feet hit the ground will running.
@warning_ignore("unused_signal")
signal foot_step
## Gobot's MeshInstance3D model.
@export var gobot_model: MeshInstance3D
## Determines whether blinking is enabled or disabled.
@export var blink = true:
set = _set_blink
@export var _left_eye_mat_override: String
@export var _right_eye_mat_override: String
@export var _open_eye: CompressedTexture2D
@export var _close_eye: CompressedTexture2D
@onready var _animation_tree: AnimationTree = %AnimationTree
@onready var _state_machine: AnimationNodeStateMachinePlayback = _animation_tree.get(
"parameters/StateMachine/playback",
)
@onready var _flip_shot_path: String = "parameters/FlipShot/request"
@onready var _hurt_shot_path: String = "parameters/HurtShot/request"
@onready var _blink_timer = %BlinkTimer
@onready var _closed_eyes_timer = %ClosedEyesTimer
@onready var _left_eye_mat: StandardMaterial3D = gobot_model.get(_left_eye_mat_override)
@onready var _right_eye_mat: StandardMaterial3D = gobot_model.get(_right_eye_mat_override)
func _ready() -> void:
_blink_timer.timeout.connect(
func() -> void:
_left_eye_mat.albedo_texture = _close_eye
_right_eye_mat.albedo_texture = _close_eye
_closed_eyes_timer.start(0.2)
)
_closed_eyes_timer.timeout.connect(
func() -> void:
_left_eye_mat.albedo_texture = _open_eye
_right_eye_mat.albedo_texture = _open_eye
_blink_timer.start(randf_range(1.0, 8.0))
)
func _set_blink(state: bool) -> void:
if _blink_timer == null or blink == state:
return
blink = state
if blink:
_blink_timer.start(0.2)
else:
_blink_timer.stop()
_closed_eyes_timer.stop()
## Sets the model to a neutral, action-free state.
func idle() -> void:
_state_machine.travel("Idle")
## Sets the model to a running animation or forward movement.
func run() -> void:
_state_machine.travel("Run")
## Sets the model to an upward-leaping animation, simulating a jump.
func jump() -> void:
_state_machine.travel("Jump")
## Sets the model to a downward animation, imitating a fall.
func fall() -> void:
_state_machine.travel("Fall")
## Sets the model to an edge-grabbing animation.
func edge_grab() -> void:
_state_machine.travel("EdgeGrab")
## Sets the model to a wall-sliding animation.
func wall_slide() -> void:
_state_machine.travel("WallSlide")
## Plays a one-shot front-flip animation.
## This animation does not play in parallel with other states.
func flip() -> void:
_animation_tree.set(_flip_shot_path, AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
## Makes a victory sign.
func victory_sign() -> void:
_state_machine.travel("VictorySign")
## Plays a one-shot hurt animation.
## This animation plays in parallel with other states.
func hurt() -> void:
_animation_tree.set(_hurt_shot_path, AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
var tween := create_tween().set_ease(Tween.EASE_OUT)
tween.tween_property(self, "scale", Vector3(1.2, 0.8, 1.2), 0.1)
tween.tween_property(self, "scale", Vector3.ONE, 0.2)
@@ -0,0 +1 @@
uid://02pjlm1ilk3w
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://div0enqs04w5j"]
[ext_resource type="Texture2D" uid="uid://dq675fmt1rg8c" path="res://addons/gdquest_gobot/textures/open_eye.png" id="1_5dt3l"]
[resource]
resource_local_to_scene = true
albedo_texture = ExtResource("1_5dt3l")
roughness = 0.6
uv1_offset = Vector3(0.1, 0, 0)
texture_repeat = false
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bt5o0sr6peltq"
path="res://.godot/imported/gobot_gobot_diffuse.png-c83f8d3c18adfb7066204439a2511192.ctex"
metadata={
"vram_texture": false
}
generator_parameters={}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/model/gobot_gobot_diffuse.png"
dest_files=["res://.godot/imported/gobot_gobot_diffuse.png-c83f8d3c18adfb7066204439a2511192.ctex"]
[params]
compress/mode=3
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=true
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=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d28w5bql3g21l"
path="res://.godot/imported/gobot_gobot_normal.png-6f93c6cc4c0a48e074db4dd4db458dbc.ctex"
metadata={
"vram_texture": false
}
generator_parameters={}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/model/gobot_gobot_normal.png"
dest_files=["res://.godot/imported/gobot_gobot_normal.png-6f93c6cc4c0a48e074db4dd4db458dbc.ctex"]
[params]
compress/mode=3
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=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://gobot_gobot_normal.png"
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=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgkj45d67dalm"
path="res://.godot/imported/gobot_gobot_roughness.png-8eba6ba5965b45eee2c401c8f0baa19e.ctex"
metadata={
"vram_texture": false
}
generator_parameters={}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/model/gobot_gobot_roughness.png"
dest_files=["res://.godot/imported/gobot_gobot_roughness.png-8eba6ba5965b45eee2c401c8f0baa19e.ctex"]
[params]
compress/mode=3
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=true
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=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfdf62ci74tew"
path.s3tc="res://.godot/imported/closed_eyes.png-aa9cb2ca69d6c9798fa101c808cfe47c.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/textures/closed_eyes.png"
dest_files=["res://.godot/imported/closed_eyes.png-aa9cb2ca69d6c9798fa101c808cfe47c.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://yj5yx07nva6l"
path.s3tc="res://.godot/imported/hurt_eyes.png-e9e04633bf0c25aa84ffd681ba4d7aab.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/textures/hurt_eyes.png"
dest_files=["res://.godot/imported/hurt_eyes.png-e9e04633bf0c25aa84ffd681ba4d7aab.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dq675fmt1rg8c"
path.s3tc="res://.godot/imported/open_eye.png-722ffe197d371649d01447f2862e3842.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://test/assets/addons/gdquest_gobot/textures/open_eye.png"
dest_files=["res://.godot/imported/open_eye.png-722ffe197d371649d01447f2862e3842.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0