コード例 #1
0
        protected override MutableObject Mutate(MutableObject mutable)
        {
            if (!IncludeRandomFloat)
            {
                if (mutable.ContainsKey("RandomFloat"))
                {
                    mutable.Remove("RandomFloat");
                }
            }
            else
            {
                if (!mutable.ContainsKey("RandomFloat"))
                {
                    mutable.Add("RandomFloat", Random.Range(0.0f, 1.0f));
                }
                else
                {
                    mutable["RandomFloat"] = Random.Range(0.0f, 1.0f);
                }
            }

            return(mutable);
        }