pivoted to top-down RPG style
This commit is contained in:
1 parent
47d9874c36
commit
f9e52d23e5
24 files changed
+5674
-37
No files matched your search
@@ -0,0 +1,35 @@
|
||||
@tool
|
||||
#@icon
|
||||
class_name DebugLabel
|
||||
extends HBoxContainer
|
||||
## Easy-to-use(?) container for visualizing variables
|
||||
|
||||
## Signals
|
||||
## Enums
|
||||
## Constants
|
||||
## @export variables
|
||||
@export var target: Node ## The Node this label applies to (usually its parent)
|
||||
@export var variable_name: String ## The variable this label displays; check spelling and casing
|
||||
## Regular variables
|
||||
## @onready variables
|
||||
@onready var title_label: Label = $TitleLabel
|
||||
@onready var value_label: Label = $ValueLabel
|
||||
|
||||
## Overridden built-in virtual methods
|
||||
#func _init() -> void:
|
||||
#func _enter_tree() -> void:
|
||||
func _ready() -> void:
|
||||
title_label.text = variable_name.capitalize() + ": "
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if not Engine.is_editor_hint():
|
||||
if target:
|
||||
if variable_name:
|
||||
var value = target.get(variable_name)
|
||||
value_label.text = str(value)
|
||||
|
||||
#func _physics_process(delta: float) -> void:
|
||||
## Remaining virtual methods
|
||||
## Overridden custom methods
|
||||
## Remaining methods
|
||||
## Subclasses
|
||||
@@ -0,0 +1 @@
|
||||
uid://1txbj5djbkq0
|
||||
@@ -0,0 +1,28 @@
|
||||
#@tool
|
||||
#@icon
|
||||
#class_name
|
||||
extends CharacterBody2D
|
||||
## Documentation comments
|
||||
|
||||
## Signals
|
||||
## Enums
|
||||
## Constants
|
||||
## @export variables
|
||||
@export var speed: int = 10
|
||||
## Regular variables
|
||||
var input_vector: Vector2
|
||||
## @onready variables
|
||||
|
||||
## Overridden built-in virtual methods
|
||||
#func _init() -> void:
|
||||
#func _enter_tree() -> void:
|
||||
#func _ready() -> void:
|
||||
#func _process(delta: float) -> void:
|
||||
func _physics_process(_delta: float) -> void:
|
||||
input_vector = Input.get_vector("left", "right", "up", "down")
|
||||
velocity = input_vector * speed
|
||||
move_and_slide()
|
||||
## Remaining virtual methods
|
||||
## Overridden custom methods
|
||||
## Remaining methods
|
||||
## Subclasses
|
||||
@@ -0,0 +1 @@
|
||||
uid://ddiwahqiekcqp
|
||||
Reference in new issue
Block a user