コード例 #1
0
        void handlePassives()
        {
            foreach (string attributeName in AttributesPassives.Keys)
            {
                IamAttribute temp;
                AttributesPassives.TryGetValue(attributeName, out temp);
                AttributeState state = temp.UpdateLogic(this);
                switch (state)
                {
                case AttributeState.Done:
                {
                    removalListForPassives.Add(attributeName);
                    break;
                }

                case AttributeState.InProgress:
                {
                    break;
                }

                case AttributeState.Loop:
                {
                    break;
                }

                default:
                    break;
                }
            }

            foreach (string name in removalListForPassives)
            {
                AttributesPassives.Remove(name);
            }
        }
コード例 #2
0
 private void makeOkDialogAttributes()
 {
     okDialogAttributes = new AttributesDictionary<bool>();
     foreach (KeyValuePair<AttributeUtils.Attribute, bool> kvp in dialogAttributes)
         if (!isNeeded(kvp.Key.value))
             okDialogAttributes.Remove(kvp.Key);
         else
             okDialogAttributes[kvp.Key] = dialogAttributes[kvp.Key];
 }
コード例 #3
0
        private void makeGraphAttributes()
        {
//            OkDialogAttributes["name"] = true;
            graphAttributes = new AttributesDictionary<string>();
            List<AttributeUtils.Attribute> keys = new List<AttributeUtils.Attribute>(graphAttributes.Keys);
            foreach (AttributeUtils.Attribute key in keys)
                if (!OkDialogAttributes.ContainsKey(key) || !OkDialogAttributes[key])
                    graphAttributes.Remove(key);
        }
コード例 #4
0
 internal AttributesDictionary<string> CreateVertexAttributes(JSONObject obj)
 {
     AttributesDictionary<string> attributes = new AttributesDictionary<string>();
     List<AttributeUtils.Attribute> keys = new List<AttributeUtils.Attribute>(attributes.Keys);
     foreach (AttributeUtils.Attribute key in keys) {
         if (!isNeeded(key.value)) {
             attributes.Remove(key);
             continue;
         }
         string name = convertKey(key.value);
         if (obj.Dictionary.ContainsKey(name)) {
             string value = name.Contains("location") ? calcLocation(obj, name) : obj.Dictionary[name].String;
             attributes[key] = value;
         }
     }
     return attributes;
 }