25 lines
448 B
C#
25 lines
448 B
C#
using UnityEngine;
|
|
|
|
// TODO: remove me!
|
|
public class AddToTeam : MonoBehaviour
|
|
{
|
|
public bool addToBuilding;
|
|
|
|
private void Start()
|
|
{
|
|
var building = GetComponent<Building>();
|
|
if (addToBuilding)
|
|
{
|
|
Team.AllBuildings.Add(building);
|
|
}
|
|
|
|
var unit = GetComponent<Unit>();
|
|
if (!addToBuilding)
|
|
{
|
|
Team.AllUnits.Add(unit);
|
|
}
|
|
|
|
Destroy(this);
|
|
}
|
|
}
|