예제 #1
0
        static public void CreateSolidObj(string spritepath, double x, double y, PhysObj PhysObject, int depth, int scale, string name = "null")
        {
            SolidObj SolidObject = new SolidObj(x, y, spritepath, PhysObject, depth, scale);

            Objects.SolidObjList.Add(SolidObject);
            if (name == "null")
            {
                Objects.NameIDObjList.Add(new NameIDObj(SolidObject.ID, SolidObject.ID, "SolidObj"));
            }
            else
            {
                Objects.NameIDObjList.Add(new NameIDObj(SolidObject.ID, name, "SolidObj"));
            }
        }
예제 #2
0
        static public void CreateSolidObj(string spritepath, double x, double y, int depth, int scale, double mass, string name = "null")
        {
            SolidObj SolidObject = new SolidObj(x, y, spritepath, new PhysObj((float)y, (float)x, 0.0, 0.0, 10, mass, true), depth, scale);

            Objects.SolidObjList.Add(SolidObject);
            if (name == "null")
            {
                Objects.NameIDObjList.Add(new NameIDObj(SolidObject.ID, SolidObject.ID, "SolidObj"));
            }
            else
            {
                Objects.NameIDObjList.Add(new NameIDObj(SolidObject.ID, name, "SolidObj"));
            }
        }