More basics

reworked some things and preppeed for suture
main
OnlyMares 2 years ago
parent 450dd3098e
commit e6014f761a

@ -1,4 +1,6 @@
CollisionShape2D CollisionShape2D
Area2D
Timer
RigidBody2D RigidBody2D
Sprite2D Sprite2D
Marker2D Marker2D

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false, "grid_snap_active": false,
"grid_step": Vector2(8, 8), "grid_step": Vector2(8, 8),
"grid_visibility": 1, "grid_visibility": 1,
"ofs": Vector2(-1083.04, -605.218), "ofs": Vector2(-1354.04, -771.218),
"primary_grid_steps": 8, "primary_grid_steps": 8,
"show_edit_locks": true, "show_edit_locks": true,
"show_guides": true, "show_guides": true,

@ -1,5 +1,5 @@
[folding] [folding]
node_unfolds=[NodePath("Sprite2D"), PackedStringArray("texture", "Texture", "Transform")] node_unfolds=[NodePath("."), PackedStringArray("Collision", "Linear", "Angular", "Constant Forces"), NodePath("Sprite2D"), PackedStringArray("texture", "Texture", "Transform")]
resource_unfolds=["res://Scenes/Cupcakes/cupcake.tscn::CircleShape2D_svirt", PackedStringArray()] resource_unfolds=["res://Scenes/Cupcakes/cupcake.tscn::CircleShape2D_svirt", PackedStringArray()]
nodes_folded=[] nodes_folded=[NodePath("Sprite2D"), NodePath("CollisionShape2D")]

@ -14,7 +14,7 @@ dock_split_1=0
dock_split_4=0 dock_split_4=0
dock_2="FileSystem" dock_2="FileSystem"
dock_3="Scene,Import" dock_3="Scene,Import"
dock_5="Inspector,Node,History,Commit (23)" dock_5="Inspector,Node,History,Commit (17)"
[EditorNode] [EditorNode]
@ -22,7 +22,7 @@ open_scenes=["res://Scenes/game_world.tscn", "res://Scenes/horse.tscn", "res://S
[ScriptEditor] [ScriptEditor]
open_scripts=["res://Scripts/game_world.gd", "res://Scripts/horse.gd"] open_scripts=["res://Scripts/Cupcake Spawn Timer.gd", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"]
open_help=["Node"] open_help=["Node"]
script_split_offset=70 script_split_offset=70
list_split_offset=0 list_split_offset=0

@ -1,6 +1,7 @@
res://Scripts/Cupcake Spawn Timer.gd
res://Scenes/game_world.tscn res://Scenes/game_world.tscn
res://Scenes/horse.tscn
res://Scripts/game_world.gd res://Scripts/game_world.gd
res://Scripts/horse.gd res://Scenes/horse.tscn
res://Scenes/cupcake.tscn
res://Scenes/Cupcakes/cupcake.tscn res://Scenes/Cupcakes/cupcake.tscn
res://Scripts/horse.gd
res://Scripts/Cupcakes/cupcake.gd

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false, "grid_snap_active": false,
"grid_step": Vector2(8, 8), "grid_step": Vector2(8, 8),
"grid_visibility": 1, "grid_visibility": 1,
"ofs": Vector2(-377.788, -221.452), "ofs": Vector2(-673.548, -647.473),
"primary_grid_steps": 8, "primary_grid_steps": 8,
"show_edit_locks": true, "show_edit_locks": true,
"show_guides": true, "show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799, "snap_rotation_step": 0.261799,
"snap_scale": false, "snap_scale": false,
"snap_scale_step": 0.1, "snap_scale_step": 0.1,
"zoom": 2.11893 "zoom": 0.471937
} }
3D={ 3D={
"fov": 70.01, "fov": 70.01,

@ -1,5 +1,5 @@
[folding] [folding]
node_unfolds=[NodePath("."), PackedStringArray("Transform", "Material", "Texture", "Ordering", "Visibility", "Editor Description", "Process")] node_unfolds=[NodePath("."), PackedStringArray("Transform", "Material", "Texture", "Ordering", "Visibility", "Editor Description", "Process", "ccVanilla")]
resource_unfolds=[] resource_unfolds=["res://Scenes/game_world.tscn::RectangleShape2D_sh03e", PackedStringArray()]
nodes_folded=[] nodes_folded=[]

@ -1,6 +1,7 @@
[editor_metadata] [editor_metadata]
executable_path="/usr/bin/godot" executable_path="/usr/bin/godot"
use_advanced_connections=false
[debug_options] [debug_options]
@ -9,7 +10,7 @@ run_reload_scripts=true
[dialog_bounds] [dialog_bounds]
project_settings=Rect2(814, 446, 1120, 920) project_settings=Rect2(814, 476, 1120, 920)
editor_settings=Rect2(830, 430, 900, 700) editor_settings=Rect2(830, 430, 900, 700)
search_help=Rect2(640, 390, 1280, 720) search_help=Rect2(640, 390, 1280, 720)
@ -20,7 +21,7 @@ recent_presets=PackedColorArray(0, 0, 0, 1, 0.2, 0.0156863, 0.286275, 0.431373,
[recent_files] [recent_files]
scenes=["res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/horse.tscn", "res://Scenes/game_world.tscn", "res://Scenes/cupcake.tscn"] scenes=["res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/horse.tscn", "res://Scenes/game_world.tscn", "res://Scenes/cupcake.tscn"]
scripts=["Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] scripts=["res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/Cupcake Spawn Timer.gd", "Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"]
[script_setup] [script_setup]

@ -1,3 +1,4 @@
res://Scripts/Cupcakes
res://Art res://Art
res://Scenes res://Scenes
res:// res://

@ -3,10 +3,10 @@
state={ state={
"bookmarks": PackedInt32Array(), "bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(), "breakpoints": PackedInt32Array(),
"column": 24, "column": 10,
"folded_lines": Array[int]([]), "folded_lines": Array[int]([]),
"h_scroll_position": 0, "h_scroll_position": 0,
"row": 8, "row": 5,
"scroll_position": 0.0, "scroll_position": 0.0,
"selection": false, "selection": false,
"syntax_highlighter": "GDScript" "syntax_highlighter": "GDScript"
@ -17,10 +17,38 @@ state={
state={ state={
"bookmarks": PackedInt32Array(), "bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(), "breakpoints": PackedInt32Array(),
"column": 43, "column": 1,
"folded_lines": Array[int]([]), "folded_lines": Array[int]([]),
"h_scroll_position": 0, "h_scroll_position": 0,
"row": 12, "row": 29,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://Scripts/Cupcake Spawn Timer.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 1,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 11,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://Scripts/Cupcakes/cupcake.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 1,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 10,
"scroll_position": 0.0, "scroll_position": 0.0,
"selection": false, "selection": false,
"syntax_highlighter": "GDScript" "syntax_highlighter": "GDScript"

@ -1,11 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://dswkgkor3yejo"] [gd_scene load_steps=4 format=3 uid="uid://dswkgkor3yejo"]
[ext_resource type="Script" path="res://Scripts/Cupcakes/cupcake.gd" id="1_2fcqt"]
[ext_resource type="Texture2D" uid="uid://7fqro4fugv8k" path="res://Art/Cupcakes/Cupcake.png" id="1_632he"] [ext_resource type="Texture2D" uid="uid://7fqro4fugv8k" path="res://Art/Cupcakes/Cupcake.png" id="1_632he"]
[sub_resource type="CircleShape2D" id="CircleShape2D_svirt"] [sub_resource type="CircleShape2D" id="CircleShape2D_svirt"]
radius = 27.0 radius = 27.0
[node name="Cupcake" type="RigidBody2D"] [node name="Cupcake" type="RigidBody2D"]
gravity_scale = 0.0
linear_damp = 6.0
script = ExtResource("1_2fcqt")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1 texture_filter = 1

@ -1,6 +1,22 @@
[gd_scene load_steps=2 format=3 uid="uid://dlypem0porccr"] [gd_scene load_steps=4 format=3 uid="uid://dlypem0porccr"]
[ext_resource type="Script" path="res://Scripts/game_world.gd" id="1_c2sx0"] [ext_resource type="Script" path="res://Scripts/game_world.gd" id="1_c2sx0"]
[ext_resource type="Script" path="res://Scripts/Cupcake Spawn Timer.gd" id="2_bjylp"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sh03e"]
size = Vector2(1943, 1102)
[node name="GameWorld" type="Node2D"] [node name="GameWorld" type="Node2D"]
script = ExtResource("1_c2sx0") script = ExtResource("1_c2sx0")
[node name="Cupcake Spawn Timer" type="Timer" parent="."]
script = ExtResource("2_bjylp")
[node name="PlayArea" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayArea"]
position = Vector2(961.5, 541)
shape = SubResource("RectangleShape2D_sh03e")
[connection signal="timeout" from="Cupcake Spawn Timer" to="Cupcake Spawn Timer" method="_on_timeout"]
[connection signal="body_exited" from="PlayArea" to="." method="_on_play_area_body_exited"]

@ -7,7 +7,7 @@
radius = 26.0 radius = 26.0
height = 116.944 height = 116.944
[node name="Mare" type="CharacterBody2D"] [node name="Horse" type="CharacterBody2D"]
scale = Vector2(2, 2) scale = Vector2(2, 2)
script = ExtResource("1_pl2bc") script = ExtResource("1_pl2bc")

@ -0,0 +1,17 @@
extends Timer
var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccChocolate = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccStrawberry = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
#var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
func _ready():
pass
func _on_timeout():

@ -0,0 +1,11 @@
extends RigidBody2D
var speed = Vector2.ZERO
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

@ -2,16 +2,21 @@ extends Node2D
var spawncount = 0 var spawncount = 0
var horse_scene = preload("res://Scenes/horse.tscn") var horse_scene = preload("res://Scenes/horse.tscn")
var cupcake_scene = preload("res://Scenes/Cupcakes/cupcake.tscn")
var horse_instance var horse_instance
var mouse_position = Vector2.ZERO var mouse_position = Vector2.ZERO
var ccVanilla @export var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
var ccvan
var ccChocolate var ccChocolate
var cupcakeSpawnRate = Timer.new() var ccchoc
var randX
var randY
var ccSpawnRate = 10
func _ready(): func _ready():
horse_instance = horse_scene.instantiate() horse_instance = horse_scene.instantiate()
ccvan = ccVanilla.instantiate()
add_child(horse_instance) add_child(horse_instance)
add_child(ccvan)
func _process(delta): func _process(delta):
@ -20,13 +25,9 @@ func _process(delta):
func spawnCupcakes(): func spawnCupcakes():
pass pass
func collectCupcakes(): func collectCupcakes():
pass pass
func _on_play_area_body_exited(body):
pass

@ -3,6 +3,7 @@ extends CharacterBody2D
var horse_instance var horse_instance
var mouse_position = Vector2.ZERO var mouse_position = Vector2.ZERO
signal hit
func _process(delta): func _process(delta):
mouse_position = lerp(mouse_position, get_global_mouse_position(), 0.02) mouse_position = lerp(mouse_position, get_global_mouse_position(), 0.02)

Loading…
Cancel
Save