コード例 #1
0
        public override bool Decode(string tag, string data)
        {
            switch (tag)
            {
            case "lpos": data.DecodeInto(out localPos); break;

            case "lsize": data.DecodeInto(out LocalScale); break;

            case "lrot": data.DecodeInto(out localRotation); break;

            case "encData": data.DecodeInto(out customData); break;

            case "shadeVal": data.DecodeInto(out shaderValue); break;

            case "speed": frameSpeed = data.ToFloat(); isOverrideSpeed = true; break;

            case "src": frameSpeedSource = (SpeedSource)data.ToInt(); break;

            case "emt": data.DecodeInto(out emit); break;

            default: return(false);
            }

            return(true);
        }
コード例 #2
0
 public SpeedAnimationFrame(SpeedAnimationFrame other)
 {
     if (other != null)
     {
         other.localPos.Encode().ToString().DecodeInto(out localPos);
         other.LocalScale.Encode().ToString().DecodeInto(out LocalScale);
         other.localRotation.Encode().ToString().DecodeInto(out localRotation);
         other.shaderValue.Encode().ToString().DecodeInto(out shaderValue);
         other.emit.Encode().ToString().DecodeInto(out emit);
         isOverrideSpeed  = other.isOverrideSpeed;
         frameSpeed       = other.frameSpeed;
         frameSpeedSource = other.frameSpeedSource;
     }
 }
コード例 #3
0
        public override bool Decode(string tag, string data)
        {
            switch (tag)
            {
            case "curve": curveSpeed = data.ToBool(); break;

            case "MaxSpeed": maxSpeed = data.ToFloat(); break;

            case "src": speedSource = (SpeedSource)data.ToInt(); break;

            case "KeyElement": keyElementIndex = data.ToInt(); break;

            case "frames": data.DecodeInto(out frames); break;

            case "Nextind": indexForNewObject = data.ToInt(); break;

            case "first": setFirstFrame = data.ToBool(); break;

            case "elm":
                List <AnimatedElement> tmp;
                data.DecodeInto(out tmp, this);
                foreach (var v in tmp)
                {
                    if (elements[v.IndexForPEGI] == null)
                    {
                        elementsUnsorted.Add(v);
                        elements[v.IndexForPEGI] = v;
                    }
                    else
                    {
                        elements[v.IndexForPEGI].Decode(v.Encode().ToString());
                    }
                }
                break;

            default: return(false);
            }
            return(true);
        }