Initial commit

This commit is contained in:
Фёдор Веселов 2024-09-08 00:45:50 +05:00
commit c266d22f58
85 changed files with 1649 additions and 0 deletions

View file

@ -0,0 +1,24 @@
using Godot;
using System;
//
// PoolContainer contains nodes that contain different elemnts that generate during runtime
// Is not pool in traditional sense, but named like that to prevent repetition
//
public partial class PoolContainer : Node
{
[Export]
public Node Zombies { get; private set; }
[Export]
public Node Plants { get; private set; }
[Export]
public Node Projectiles { get; private set; }
[Export]
public Node Structures { get; private set; }
public override void _Ready()
{
LevelController.Instance.Pools = this;
}
}

View file

@ -0,0 +1,33 @@
using Godot;
//using Godot.Collections;
using System;
public partial class RuntimeLevelData : Node
{
public int SunCount { get; private set; } = 0;
public override void _Ready()
{
LevelController.Instance.LevelData = this;
}
public void AddSun(int amount)
{
SunCount += amount;
}
public bool TrySpendSun(int amount)
{
if (SunCount - amount < 0) return false;
SunCount -= amount;
return true;
}
//private Array<PlantResource> _selectedPlants;
//private bool _selected;
//public Array<PlantResource> GetSelectedPlants();
//public bool TrySelectPlants(Array<PlantResource>);
//public void ResetSelection();
}