25 lines
667 B
C#
25 lines
667 B
C#
using Godot;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
public partial class Globals : Node
|
|
{
|
|
public static Globals Instance;
|
|
public bool _battleRunning = false;
|
|
public Viewport _viewport;
|
|
public Vector2 _screenSize;
|
|
public Vector2 _screenCenter;
|
|
public Random _random = new();
|
|
public PackedScene _workerScene = ResourceLoader.Load<PackedScene>("res://Gameplay/worker.tscn");
|
|
public PackedScene _tchotchkeScene = ResourceLoader.Load<PackedScene>("res://Gameplay/tchotchke.tscn");
|
|
|
|
public override void _Ready()
|
|
{
|
|
Instance = this;
|
|
_viewport = GetViewport();
|
|
_screenSize = _viewport.GetVisibleRect().Size;
|
|
_screenCenter = _screenSize / 2;
|
|
}
|
|
|
|
}
|