summaryrefslogtreecommitdiff
path: root/Globals.gd
blob: 9078635e544ca2db5af1b2aed6eece667716ba88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extends Node

const WIDTH = 2048
const HEIGHT = 2048
const LIMITS = Vector2(WIDTH, HEIGHT)
const LIMITS_MIN = -LIMITS / 2
const LIMITS_MAX = LIMITS / 2
var FUN = false

@onready var _primogem: PackedScene = load("res://coin.tscn")

func _ready() -> void:
	randomize()

func spawn_primogem(pos: Vector2) -> void:
	var e: Area2D = _primogem.instantiate()
	e.position = Vector2(pos.x, pos.y)
	get_node("../Game/Coins").add_child(e)