示例#1
0
    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;
    }
示例#2
0
 public void SetUnitStats(FactionTypes factionType, JobTypes jobType)
 {
     this.factionType = factionType;
     this.jobType     = jobType;
     CheckUnitStats();
 }