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