public static AutoGunnerBuilder AutoGunnerFactory(GUNNER_TYPE type, AutoGunner gunnerPrefab, Transform transform) { AutoGunnerBuilder ret = new AutoGunnerBuilder(Instantiate(gunnerPrefab, transform) as AutoGunner); switch (type) { case GUNNER_TYPE.NEGATIVE: ret.setGunnerType(GUNNER_TYPE.NEGATIVE); break; case GUNNER_TYPE.DART: ret.setGunnerType(GUNNER_TYPE.DART); break; } return(ret); }
public AutoGunnerBuilder setGunnerType(GUNNER_TYPE type) { this.type = type; return(this); }