예제 #1
0
    public static OnRailRechargeMarker Create()
    {
        float random = UnityEngine.Random.value;

        if (random > 0.8f)
        {
            return(RechargeRiderMarker.Create());
        }
        else
        {
            return(SingleMarker.Create());
        }
    }
예제 #2
0
    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);
    }