예제 #1
0
 void WriteParticlesMagnetProperties(ParticlesMagnet node)
 {
     WriteWidgetProperties(node);
     WriteProperty("Shape", (int)node.Shape, (int)EmitterShape.Area);
     WriteProperty("Strength", node.Strength, 1000f);
     WriteProperty("Attenuation", node.Attenuation, 0f);
 }
예제 #2
0
        protected void ParseParticlesMagnetProperty(Node node, string name)
        {
            ParticlesMagnet magnet = (ParticlesMagnet)node;

            switch (name)
            {
            case "Shape":
                magnet.Shape = (EmitterShape)lexer.ParseInt();
                break;

            case "Attenuation":
                magnet.Attenuation = lexer.ParseFloat();
                break;

            case "Strength":
                magnet.Strength = lexer.ParseFloat();
                break;

            default:
                ParseGraphicProperty(magnet, name);
                break;
            }
        }