示例#1
0
 public SkillVar(SkillVar source)
 {
     this.variableName = source.variableName;
     this.useVariable  = source.useVariable;
     this.type         = source.type;
     this.GetValueFrom(source.NamedVar);
 }
示例#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();
 }
示例#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;
         }
     }
 }
示例#4
0
 public SkillVarOverride(SkillVarOverride source)
 {
     this.variable = new NamedVariable(source.variable.Name);
     this.fsmVar   = new SkillVar(source.fsmVar);
     this.isEdited = source.isEdited;
 }
示例#5
0
 public SkillVarOverride(NamedVariable namedVar)
 {
     this.variable = namedVar;
     this.fsmVar   = new SkillVar(this.variable);
     this.isEdited = false;
 }