Esempio n. 1
0
 public SkillVar(SkillVar source)
 {
     this.variableName = source.variableName;
     this.useVariable  = source.useVariable;
     this.type         = source.type;
     this.GetValueFrom(source.NamedVar);
 }
Esempio n. 2
0
 public void SetPropertyName(string propertyName)
 {
     this.ResetParameters();
     this.PropertyName = propertyName;
     if (!string.IsNullOrEmpty(this.PropertyName))
     {
         if (!object.ReferenceEquals(this.TargetType, null))
         {
             this.PropertyType = ReflectionUtils.GetPropertyType(this.TargetType, this.PropertyName);
             if (this.TargetType.IsSubclassOf(typeof(Object)) && !object.ReferenceEquals(this.PropertyType, null))
             {
                 this.ObjectParameter.ObjectType = this.PropertyType;
             }
             else
             {
                 if (this.PropertyType.get_IsArray())
                 {
                     this.ArrayParameter.ElementType = SkillVar.GetVariableType(this.PropertyType.GetElementType());
                 }
             }
         }
     }
     else
     {
         this.PropertyType = null;
     }
     this.Init();
 }
Esempio n. 3
0
 public SkillVar(Type type)
 {
     this.type = SkillVar.GetVariableType(type);
     if (type.get_IsEnum())
     {
         this.EnumType = type;
         return;
     }
     if (type.get_IsArray())
     {
         Type elementType = type.GetElementType();
         this.arrayValue = new SkillArray
         {
             ElementType = SkillVar.GetVariableType(elementType)
         };
         if (elementType.get_IsEnum() || typeof(Object).IsAssignableFrom(elementType))
         {
             this.arrayValue.ObjectType = elementType;
             return;
         }
     }
     else
     {
         if (type.IsSubclassOf(typeof(Object)))
         {
             this.ObjectType = type;
         }
     }
 }
Esempio n. 4
0
 public SkillVarOverride(SkillVarOverride source)
 {
     this.variable = new NamedVariable(source.variable.Name);
     this.fsmVar   = new SkillVar(source.fsmVar);
     this.isEdited = source.isEdited;
 }
Esempio n. 5
0
 public SkillVarOverride(NamedVariable namedVar)
 {
     this.variable = namedVar;
     this.fsmVar   = new SkillVar(this.variable);
     this.isEdited = false;
 }