コード例 #1
0
ファイル: Physics.cs プロジェクト: redcodefinal/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode();
            rootnode = rootnode + "->" + nodename + "->";

            Drag = xmlparser.GetFloat(rootnode + "Drag");
            AngularVelocity = xmlparser.GetFloat(rootnode + "AngularVelocity");
            Velocity = xmlparser.GetVector2(rootnode + "Velocity");
        }
コード例 #2
0
ファイル: Render.cs プロジェクト: redcodefinal/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode() + "->Render->";
            Texture = LoadTexture(xmlparser.GetString(rootnode + "Texture"));

            Color = xmlparser.GetColor(rootnode + "Color");
            Alpha = xmlparser.GetFloat(rootnode + "Alpha");
            Scale = xmlparser.GetVector2(rootnode + "Scale");
            Layer = xmlparser.GetFloat(rootnode + "Layer");
        }
コード例 #3
0
ファイル: Physics.cs プロジェクト: sol-vin/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode();

            rootnode = rootnode + "->" + nodename + "->";

            Drag            = xmlparser.GetFloat(rootnode + "Drag");
            AngularVelocity = xmlparser.GetFloat(rootnode + "AngularVelocity");
            Velocity        = xmlparser.GetVector2(rootnode + "Velocity");
        }
コード例 #4
0
ファイル: Sound.cs プロジェクト: sol-vin/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string path)
        {
            string rootnode = xmlparser.GetRootNode();
            rootnode = rootnode + "->" + path + "->";

            Volume = xmlparser.GetFloat(rootnode + "Volume");
            Pan = xmlparser.GetFloat(rootnode + "Pan");
            Pitch = xmlparser.GetFloat(rootnode + "Pitch");
            Loop = xmlparser.GetBool(rootnode + "Loop");
            SoundEffect = LoadSound(rootnode + "SoundEffect").CreateInstance();
        }
コード例 #5
0
ファイル: Render.cs プロジェクト: sol-vin/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode() + "->Render->";

            Texture = LoadTexture(xmlparser.GetString(rootnode + "Texture"));

            Color = xmlparser.GetColor(rootnode + "Color");
            Alpha = xmlparser.GetFloat(rootnode + "Alpha");
            Scale = xmlparser.GetVector2(rootnode + "Scale");
            Layer = xmlparser.GetFloat(rootnode + "Layer");
        }
コード例 #6
0
ファイル: Body.cs プロジェクト: redcodefinal/EntityEngine
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode();
            rootnode = rootnode + "->"+nodename+"->";
            try
            {
                Position = xmlparser.GetVector2(rootnode + "Position");
            }
            catch{}

            try
            {
                Angle = xmlparser.GetFloat(rootnode + "Angle");
            }
            catch{}
        }
コード例 #7
0
        public override void ParseXml(XmlParser xmlparser, string nodename)
        {
            string rootnode = xmlparser.GetRootNode();

            rootnode = rootnode + "->" + nodename + "->";
            try
            {
                Position = xmlparser.GetVector2(rootnode + "Position");
            }
            catch {}

            try
            {
                Angle = xmlparser.GetFloat(rootnode + "Angle");
            }
            catch {}
        }