Example #1
0
        public List <List <float> > GetRandomDrop(float modify)
        {
            var dropList = config.drop;
            var drop     = Util.ParseConfig(dropList);
            //var lastRd = 0.0f;
            //id rate num
            List <List <float> > allDrops = new List <List <float> >();

            foreach (var d in drop)
            {
                var rd = Random.Range(0, 1.0f);
                Log.Sys("random " + rd + " last " + " d " + d [1]);

                //100% 掉落
                if (d.Count >= 4)
                {
                    allDrops.Add(d);
                }
                else
                {
                    if (rd < d [1] * modify)
                    {
                        allDrops.Add(d);
                    }
                }
            }
            return(allDrops);
        }