Polished up the start marker, changed cursor logic I think or something I don't want to diff
This commit is contained in:
parent
8ac387076a
commit
10552b377b
BIN
assets/sprites/monster-programmer.png
Normal file
BIN
assets/sprites/monster-programmer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
34
assets/sprites/monster-programmer.png.import
Normal file
34
assets/sprites/monster-programmer.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://54uy8wr13v7y"
|
||||
path="res://.godot/imported/monster-programmer.png-ab25b81a62d3e60a3afa8336a427284f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/monster-programmer.png"
|
||||
dest_files=["res://.godot/imported/monster-programmer.png-ab25b81a62d3e60a3afa8336a427284f.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
|
||||
BIN
assets/sprites/monster-programmer.xcf
Normal file
BIN
assets/sprites/monster-programmer.xcf
Normal file
Binary file not shown.
BIN
assets/textures/lined-paper-margin.png
Normal file
BIN
assets/textures/lined-paper-margin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
34
assets/textures/lined-paper-margin.png.import
Normal file
34
assets/textures/lined-paper-margin.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvn2kc5cb23ob"
|
||||
path="res://.godot/imported/lined-paper-margin.png-2ae3d1d8409c38a2be5e57ed7a16368a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/lined-paper-margin.png"
|
||||
dest_files=["res://.godot/imported/lined-paper-margin.png-2ae3d1d8409c38a2be5e57ed7a16368a.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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 92 KiB |
@ -18,6 +18,7 @@ size = Vector2(152.5, 717.75)
|
||||
size = Vector2(1263.25, 220.875)
|
||||
|
||||
[node name="MouseLoop" type="Node2D"]
|
||||
z_index = 1
|
||||
script = ExtResource("1_x04i4")
|
||||
|
||||
[node name="Cursor" parent="." instance=ExtResource("3_aaj44")]
|
||||
@ -43,8 +44,8 @@ shape = SubResource("RectangleShape2D_olkr6")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
z_index = -1
|
||||
[node name="LinedPaper" type="TextureRect" parent="."]
|
||||
z_index = -2
|
||||
custom_minimum_size = Vector2(960, 540)
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@ -58,6 +59,7 @@ stretch_mode = 1
|
||||
|
||||
[node name="StartMarker" parent="." instance=ExtResource("4_u4ca0")]
|
||||
visible = false
|
||||
z_index = -1
|
||||
|
||||
[connection signal="started_drawing" from="Cursor" to="." method="_on_cursor_started_drawing"]
|
||||
[connection signal="stopped_drawing" from="Cursor" to="." method="_on_cursor_stopped_drawing"]
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c0srxosarykx7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bmke2komimx40" path="res://scenes/objects/collectable.gd" id="1_dtuyt"]
|
||||
[ext_resource type="Texture2D" uid="uid://b5s8fiaschsvs" path="res://icon.svg" id="1_raufp"]
|
||||
[ext_resource type="Texture2D" uid="uid://54uy8wr13v7y" path="res://assets/sprites/monster-programmer.png" id="2_dtuyt"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aaj44"]
|
||||
size = Vector2(48, 46)
|
||||
|
||||
[node name="Collectable" type="CharacterBody2D" groups=["collectable"]]
|
||||
z_index = -1
|
||||
script = ExtResource("1_dtuyt")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(1, 0)
|
||||
shape = SubResource("RectangleShape2D_aaj44")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("1_raufp")
|
||||
texture = ExtResource("2_dtuyt")
|
||||
|
||||
14
scenes/objects/StartMarker.gdshader
Normal file
14
scenes/objects/StartMarker.gdshader
Normal file
@ -0,0 +1,14 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float speed = 4.0;
|
||||
uniform float scale = 8.0;
|
||||
uniform vec4 color_a: source_color = vec4(1.,1.,1.,1.);
|
||||
uniform vec4 color_b: source_color = vec4(0.,0.,0.,1.);
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = FRAGCOORD.xy;
|
||||
float t = .5 + sin((uv.x + uv.y) / scale + TIME * speed) * .5;
|
||||
t -= .5 + sin((uv.x - uv.y) / scale + TIME * speed) * .5;
|
||||
vec3 tvec = vec3(t,t,t);
|
||||
COLOR = tvec.x > 0.0 ? color_a : color_b;
|
||||
}
|
||||
1
scenes/objects/StartMarker.gdshader.uid
Normal file
1
scenes/objects/StartMarker.gdshader.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://clj5gpccox0tb
|
||||
@ -1,6 +1,18 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dnr505je252gd"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dnr505je252gd"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://clj5gpccox0tb" path="res://scenes/objects/StartMarker.gdshader" id="1_kpqbh"]
|
||||
[ext_resource type="Script" uid="uid://bwut7fxknsnos" path="res://scenes/objects/start_marker.gd" id="1_u6erm"]
|
||||
|
||||
[node name="StartMarker" type="Node2D"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3ykre"]
|
||||
shader = ExtResource("1_kpqbh")
|
||||
shader_parameter/speed = 16.0
|
||||
shader_parameter/scale = 8.0
|
||||
shader_parameter/color_a = Color(0.158472, 0.158472, 0.158472, 1)
|
||||
shader_parameter/color_b = Color(0.864675, 0.864675, 0.864675, 1)
|
||||
|
||||
[node name="StartMarker" type="Line2D"]
|
||||
material = SubResource("ShaderMaterial_3ykre")
|
||||
points = PackedVector2Array(-64, -64, 64, -64, 64, 64, -64, 64)
|
||||
closed = true
|
||||
width = 32.0
|
||||
script = ExtResource("1_u6erm")
|
||||
|
||||
@ -82,9 +82,10 @@ func create_valid_loop() -> void:
|
||||
loop_stack.append(smoothed_loop)
|
||||
|
||||
func push_history_stack(value : Vector2) -> void:
|
||||
if positions_history.size() < Globals.HISTORY_LENGTH:
|
||||
positions_history.append(value)
|
||||
if positions_history.size() > Globals.HISTORY_LENGTH:
|
||||
positions_history.pop_front()
|
||||
# if positions_history.size() > Globals.HISTORY_LENGTH:
|
||||
# positions_history.pop_front()
|
||||
|
||||
func restrict_cursor() -> void:
|
||||
if global_position.x < 0:
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
extends Node2D
|
||||
extends Line2D
|
||||
|
||||
func _draw() -> void:
|
||||
draw_circle(Vector2(), 32, Color.GREEN, true, 0, false)
|
||||
func _ready() -> void:
|
||||
var points = []
|
||||
for i in range(36):
|
||||
var a = deg_to_rad(i * 10)
|
||||
points.append(Vector2(cos(a), -sin(a)) * ((self.width / 2.0) - Globals.SNAP_DISTANCE))
|
||||
self.points = points
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user