Using viewport texture instead of manual rect blending
This commit is contained in:
+7
-1
@@ -1,4 +1,4 @@
|
||||
class Player extends CharacterBody3D
|
||||
extends CharacterBody3D
|
||||
|
||||
@export var color : Color = Color.DODGER_BLUE
|
||||
|
||||
@@ -7,9 +7,12 @@ class Player extends CharacterBody3D
|
||||
@export var move_down_action := "move_down"
|
||||
@export var move_up_action := "move_up"
|
||||
@export var dash_action := "dash"
|
||||
@export var bomb_action := "bomp"
|
||||
|
||||
@onready var geometry = $Geometry
|
||||
|
||||
signal bomb_triggered
|
||||
|
||||
var angle = 0
|
||||
var is_dashing = false
|
||||
var dash_time = 0
|
||||
@@ -30,6 +33,9 @@ func _physics_process(delta):
|
||||
# Handle jump.
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
velocity.y = JUMP_VELOCITY
|
||||
|
||||
if Input.is_action_just_pressed(bomb_action):
|
||||
emit_signal("bomb_triggered", self)
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
|
||||
Reference in New Issue
Block a user