Exemplo n.º 1
0
 public SkillQuaternion(SkillQuaternion source) : base(source)
 {
     if (source != null)
     {
         this.value = source.value;
     }
 }
Exemplo n.º 2
0
        public static ICollection <byte> FsmQuaternionToByteArray(SkillQuaternion fsmQuaternion)
        {
            if (fsmQuaternion == null)
            {
                fsmQuaternion = new SkillQuaternion();
            }
            List <byte> list = new List <byte>();

            list.AddRange(SkillUtility.QuaternionToByteArray(fsmQuaternion.Value));
            list.AddRange(SkillUtility.BitConverter.GetBytes(fsmQuaternion.UseVariable));
            list.AddRange(SkillUtility.StringToByteArray(fsmQuaternion.Name));
            return(list);
        }
Exemplo n.º 3
0
 public void ResetParameters()
 {
     this.BoolParameter       = false;
     this.FloatParameter      = 0f;
     this.IntParameter        = 0;
     this.StringParameter     = "";
     this.GameObjectParameter = new SkillGameObject("");
     this.Vector2Parameter    = new SkillVector2();
     this.Vector3Parameter    = new SkillVector3();
     this.RectParamater       = new SkillRect();
     this.QuaternionParameter = new SkillQuaternion();
     this.ObjectParameter     = new SkillObject();
     this.MaterialParameter   = new SkillMaterial();
     this.TextureParameter    = new SkillTexture();
     this.ColorParameter      = new SkillColor();
     this.EnumParameter       = new SkillEnum();
     this.ArrayParameter      = new SkillArray();
 }
Exemplo n.º 4
0
 public FunctionCall(FunctionCall source)
 {
     this.FunctionName        = source.FunctionName;
     this.parameterType       = source.parameterType;
     this.BoolParameter       = new SkillBool(source.BoolParameter);
     this.FloatParameter      = new SkillFloat(source.FloatParameter);
     this.IntParameter        = new SkillInt(source.IntParameter);
     this.GameObjectParameter = new SkillGameObject(source.GameObjectParameter);
     this.ObjectParameter     = source.ObjectParameter;
     this.StringParameter     = new SkillString(source.StringParameter);
     this.Vector2Parameter    = new SkillVector2(source.Vector2Parameter);
     this.Vector3Parameter    = new SkillVector3(source.Vector3Parameter);
     this.RectParamater       = new SkillRect(source.RectParamater);
     this.QuaternionParameter = new SkillQuaternion(source.QuaternionParameter);
     this.MaterialParameter   = new SkillMaterial(source.MaterialParameter);
     this.TextureParameter    = new SkillTexture(source.TextureParameter);
     this.ColorParameter      = new SkillColor(source.ColorParameter);
     this.EnumParameter       = new SkillEnum(source.EnumParameter);
     this.ArrayParameter      = new SkillArray(source.ArrayParameter);
 }
Exemplo n.º 5
0
 public SkillProperty(SkillProperty source)
 {
     this.setProperty         = source.setProperty;
     this.TargetObject        = new SkillObject(source.TargetObject);
     this.TargetTypeName      = source.TargetTypeName;
     this.TargetType          = source.TargetType;
     this.PropertyName        = source.PropertyName;
     this.PropertyType        = source.PropertyType;
     this.BoolParameter       = new SkillBool(source.BoolParameter);
     this.FloatParameter      = new SkillFloat(source.FloatParameter);
     this.IntParameter        = new SkillInt(source.IntParameter);
     this.GameObjectParameter = new SkillGameObject(source.GameObjectParameter);
     this.StringParameter     = new SkillString(source.StringParameter);
     this.Vector2Parameter    = new SkillVector2(source.Vector2Parameter);
     this.Vector3Parameter    = new SkillVector3(source.Vector3Parameter);
     this.RectParamater       = new SkillRect(source.RectParamater);
     this.QuaternionParameter = new SkillQuaternion(source.QuaternionParameter);
     this.ObjectParameter     = new SkillObject(source.ObjectParameter);
     this.MaterialParameter   = new SkillMaterial(source.MaterialParameter);
     this.TextureParameter    = new SkillTexture(source.TextureParameter);
     this.ColorParameter      = new SkillColor(source.ColorParameter);
     this.EnumParameter       = new SkillEnum(source.EnumParameter);
     this.ArrayParameter      = new SkillArray(source.ArrayParameter);
 }
Exemplo n.º 6
0
        public void SetVariable(NamedVariable variable)
        {
            if (variable == null)
            {
                this.ResetParameters();
                return;
            }
            switch (variable.VariableType)
            {
            case VariableType.Unknown:
                return;

            case VariableType.Float:
                this.FloatParameter = (variable as SkillFloat);
                return;

            case VariableType.Int:
                this.IntParameter = (variable as SkillInt);
                return;

            case VariableType.Bool:
                this.BoolParameter = (variable as SkillBool);
                return;

            case VariableType.GameObject:
                this.GameObjectParameter = (variable as SkillGameObject);
                return;

            case VariableType.String:
                this.StringParameter = (variable as SkillString);
                return;

            case VariableType.Vector2:
                this.Vector2Parameter = (variable as SkillVector2);
                return;

            case VariableType.Vector3:
                this.Vector3Parameter = (variable as SkillVector3);
                return;

            case VariableType.Color:
                this.ColorParameter = (variable as SkillColor);
                return;

            case VariableType.Rect:
                this.RectParamater = (variable as SkillRect);
                return;

            case VariableType.Material:
                this.MaterialParameter = (variable as SkillMaterial);
                return;

            case VariableType.Texture:
                this.TextureParameter = (variable as SkillTexture);
                return;

            case VariableType.Quaternion:
                this.QuaternionParameter = (variable as SkillQuaternion);
                return;

            case VariableType.Object:
                this.ObjectParameter = (variable as SkillObject);
                return;

            case VariableType.Array:
                this.ArrayParameter = (variable as SkillArray);
                return;

            case VariableType.Enum:
                this.EnumParameter = (variable as SkillEnum);
                return;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }