Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
 public AutoGunnerBuilder setGunnerType(GUNNER_TYPE type)
 {
     this.type = type;
     return(this);
 }