Broken sunflower

This commit is contained in:
Фёдор Веселов 2024-09-17 00:09:49 +05:00
commit 83d36f53b2
6 changed files with 211 additions and 6 deletions

View file

@ -0,0 +1,19 @@
using Godot;
using System;
public partial class PlantSunSpawner : Node2D
{
[Export]
private PackedScene _sunScene;
[Export]
private int _amountPerSun;
public void Spawn()
{
var sun = _sunScene.Instantiate<Sun>();
sun.amount = _amountPerSun;
LevelController.Instance.Pools.Projectiles.AddChild(sun);
sun.GlobalPosition = GlobalPosition;
}
}