meow
This commit is contained in:
parent
1dadffeac4
commit
ab1797b9ed
6 changed files with 120 additions and 61 deletions
31
worldManager.gd
Normal file
31
worldManager.gd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
extends Node2D
|
||||
|
||||
@export var camera : Camera2D
|
||||
@export var map : Sprite2D
|
||||
@export var cyclones : Array[RigidBody2D]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
check_edges()
|
||||
|
||||
func check_edges():
|
||||
#var right_center = map.global_position + Vector2(map.texture.get_width(), 0)
|
||||
#var top_center = map.global_position + Vector2(0, map.texture.get_height())
|
||||
var map_top : float = map.global_position.y + map.texture.get_height()
|
||||
var map_bottom : float = map.global_position.y - map.texture.get_height()
|
||||
var map_right : float = map.global_position.x + map.texture.get_width()
|
||||
var map_left : float = map.global_position.x - map.texture.get_width()
|
||||
print("Top: " + str(map_top))
|
||||
print("Bottom: " + str(map_top))
|
||||
print("Left: " + str(map_top))
|
||||
print("Right: " + str(map_top))
|
||||
|
||||
for cyclone in cyclones:
|
||||
pass
|
||||
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue