wei
2020-12-17 bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e
HDL_ON/Entity/Function/Curtain.cs
@@ -31,7 +31,7 @@
                {
                    if(trait_percent==null)
                    {
                        trait_percent = function.Find((obj) => obj.key == "percent");
                        trait_percent = attributes.Find((obj) => obj.key == "percent");
                        if (trait_percent == null)
                        {
                            trait_percent = new FunctionAttributes()
@@ -40,9 +40,11 @@
                                value = new List<string> { "up", "down" },
                                max = 100,
                                min = 0,
                                curValue = 0
                            };
                        }
                        trait_percent.curValue = trait_percent.min;
                        if (trait_percent.curValue.ToString() == "{}")
                            trait_percent.curValue = 0;
                    }
                    return Convert.ToInt32( trait_percent.curValue);
                }