basic texture

This commit is contained in:
2024-03-15 15:55:19 +01:00
parent 249bd45f04
commit 5f87e4f54f
13 changed files with 126 additions and 15 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
extends RigidBody2D
const SPEED = 500.0
const SPEED = 800.0
func _physics_process(delta):
if Input.is_action_pressed(get_meta("UP_KEY")):
+4 -3
View File
@@ -1,6 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://ce4mnfokb6pkn"]
[gd_scene load_steps=5 format=3 uid="uid://ce4mnfokb6pkn"]
[ext_resource type="Script" path="res://scenes/playground/racket/Racket.gd" id="1_gclos"]
[ext_resource type="Texture2D" uid="uid://cc71lbhjc1wl5" path="res://assets/racket.png" id="2_7620b"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_lq6ot"]
friction = 0.0
@@ -19,7 +20,7 @@ script = ExtResource("1_gclos")
position = Vector2(20, 72)
shape = SubResource("RectangleShape2D_ehve4")
[node name="ColorRect" type="ColorRect" parent="."]
[node name="TextureRect" type="TextureRect" parent="."]
offset_right = 40.0
offset_bottom = 144.0
color = Color(0.0117647, 0.0117647, 0.0117647, 1)
texture = ExtResource("2_7620b")