33 lines
779 B
C#
33 lines
779 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class Main : Node
|
|
{
|
|
public Battle _currentBattle;
|
|
public Manager _player;
|
|
public Manager _computer;
|
|
|
|
public override void _Ready()
|
|
{
|
|
Globals.Instance._screenSize = GetViewport().GetVisibleRect().Size;
|
|
Globals.Instance._screenCenter = new Vector2(Globals.Instance._screenSize.X / 2, Globals.Instance._screenSize.Y / 2);
|
|
// Battle newBattle = Battle._Create();
|
|
_currentBattle = GetNode<Battle>("Battle");
|
|
_player = GetNode<Manager>("Player");
|
|
_computer = GetNode<Manager>("Computer");
|
|
// AddChild(newBattle);
|
|
_currentBattle.Start();
|
|
_player.Start();
|
|
_computer.Start();
|
|
}
|
|
|
|
public override void _Process(double DELTA_)
|
|
{
|
|
if (Input.IsActionJustReleased("quit_game"))
|
|
{
|
|
GetTree().Quit();
|
|
}
|
|
}
|
|
|
|
}
|