Cube and a simple slice script thats now empty cuz i couldn't get it to work...

also the cursor now is area2D
This commit is contained in:
2025-06-30 16:16:57 +03:00
parent e2cc40266b
commit 6a34f6dcd0
7 changed files with 89 additions and 7 deletions

16
game/Objects/Cube.tscn Normal file
View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=4 format=3 uid="uid://ctcv7rr8w3fnf"]
[ext_resource type="Texture2D" uid="uid://2nxh3mui3ia7" path="res://Textures/svg/Cube.svg" id="1_k3834"]
[ext_resource type="Script" uid="uid://cu1ss1gvex68v" path="res://Objects/SelfSlicer.gd" id="1_m4rrt"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ae35o"]
size = Vector2(68, 68)
[node name="Node2D" type="Area2D"]
script = ExtResource("1_m4rrt")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_k3834")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_ae35o")

View File

@@ -1,11 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://c42ny2e8vbhhc"]
[gd_scene load_steps=4 format=3 uid="uid://c42ny2e8vbhhc"]
[ext_resource type="Script" uid="uid://ccydu80643k4s" path="res://Scripts/CursorScript.gd" id="1_uu6xs"]
[ext_resource type="Texture2D" uid="uid://d0hckoql2xnbq" path="res://Textures/svg/Cursor.svg" id="2_r0du0"]
[node name="Cursor" type="Node2D"]
[sub_resource type="CircleShape2D" id="CircleShape2D_v75j3"]
radius = 28.0713
[node name="Cursor" type="Area2D"]
script = ExtResource("1_uu6xs")
ShowMouse = true
[node name="CursorTexture" type="Sprite2D" parent="."]
texture = ExtResource("2_r0du0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_v75j3")

View File

@@ -0,0 +1,12 @@
extends Area2D
class_name SelfSlicer
@export var cursor_path: NodePath
@onready var cursor = get_node(cursor_path)
@onready var mesh_instance: MeshInstance2D = $MeshInstance2D
var sliced = false
func _ready():
pass

View File

@@ -0,0 +1 @@
uid://cu1ss1gvex68v

View File

@@ -0,0 +1 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="67.71245" height="67.71245" viewBox="0,0,67.71245,67.71245"><g transform="translate(-366.14378,-366.14378)"><g stroke="#000000" stroke-miterlimit="10"><path d="M382.64378,432.35622c-8.28427,0 -15,-6.71573 -15,-15v-34.71245c0,-8.28427 6.71573,-15 15,-15h34.71245c8.28427,0 15,6.71573 15,15v34.71245c0,8.28427 -6.71573,15 -15,15z" fill="#5500ff" stroke-width="3"/><path d="M393.14241,400l-16.03323,21.82838l0,-43.65675z" fill="#ffffff" stroke-width="0"/></g></g></svg><!--rotationCenter:33.856222711267606:33.856222711267606-->

After

Width:  |  Height:  |  Size: 629 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2nxh3mui3ia7"
path="res://.godot/imported/Cube.svg-409cabd6dcb0b84f2c3b958641ea4c35.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/svg/Cube.svg"
dest_files=["res://.godot/imported/Cube.svg-409cabd6dcb0b84f2c3b958641ea4c35.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -1,14 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://dc02h0h7ooucv"]
[gd_scene load_steps=4 format=3 uid="uid://dc02h0h7ooucv"]
[ext_resource type="Script" uid="uid://hfccs84dimkv" path="res://test_ground.gd" id="1_85h15"]
[ext_resource type="PackedScene" uid="uid://c42ny2e8vbhhc" path="res://Cursor.tscn" id="1_rkps0"]
[ext_resource type="PackedScene" uid="uid://c42ny2e8vbhhc" path="res://Objects/Cursor.tscn" id="1_rkps0"]
[ext_resource type="PackedScene" uid="uid://ctcv7rr8w3fnf" path="res://Objects/Cube.tscn" id="3_66313"]
[node name="Screen" type="CanvasLayer"]
script = ExtResource("1_85h15")
[node name="Cursor" parent="." instance=ExtResource("1_rkps0")]
position = Vector2(263, 291)
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchors_preset = 2
anchor_top = 1.0
@@ -38,3 +36,14 @@ text = "Procces Time: "
[node name="VideoMemory" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "Video Mem:"
[node name="Node2D" parent="." instance=ExtResource("3_66313")]
position = Vector2(409, 323)
cursor_path = NodePath("../Cursor")
[node name="Node2D2" parent="." instance=ExtResource("3_66313")]
position = Vector2(615, 531)
rotation = 0.60511
[node name="Cursor" parent="." instance=ExtResource("1_rkps0")]
position = Vector2(263, 291)