using Model; namespace Controller { [Factory(typeof (Unit), UnitType.GatePlayer)] public class UnitGatePlayerFactory: IFactory { public Unit Create(int configId) { Unit player = new Unit(configId); player.AddComponent(); player.AddComponent(); World.Instance.GetComponent().Add(player); return player; } } }