public static OnRailRechargeMarker Create() { float random = UnityEngine.Random.value; if (random > 0.8f) { return(RechargeRiderMarker.Create()); } else { return(SingleMarker.Create()); } }
public new static RechargeRiderMarker Create() { var name = "Recharge-Rider-Marker"; PoolManager pm = PoolManager.Instance; if (!pm.ContainsKey(name)) { RechargeRiderMarker prefab = Resources.Load <RechargeRiderMarker>($"Prefabs/{name}"); prefab.Key = name; pm.CreatePool(prefab); } RechargeRiderMarker seg = pm.Next <RechargeRiderMarker>(name); return(seg); }