public static void CreateUnit(FactionTypes factionType, JobTypes jobType, Transform parent = null) { GameObject unitObject = new GameObject("Unit", typeof(Unit)); unitObject.GetComponent <Unit>().SetUnitStats(factionType, jobType); unitObject.transform.parent = parent; }
public void SetUnitStats(FactionTypes factionType, JobTypes jobType) { this.factionType = factionType; this.jobType = jobType; CheckUnitStats(); }