public CharObj(double x, double y, List <SpriteObj> animationlist, double mass, int depth, int speed, int scale, bool isplayer) { X = x; Y = y; AnimationList = animationlist; PhysicsObject = new PhysObj((float)X, (float)Y, 0.0, 0.0, 10, mass, true); isPlayer = isplayer; ID = Objects.GetID(); CurrentAnimation = 0; }
public SolidObj(double x, double y, string spritepath, double mass, int depth, int scale) { X = x; Y = y; Depth = depth; Scale = scale; SpritePath = spritepath; PhysicsObject = new PhysObj((float)X, (float)Y, 0.0, 0.0, 10, mass, true); ID = Objects.GetID(); System.Drawing.Bitmap bit = new System.Drawing.Bitmap(spritepath); Width = bit.Width; Height = bit.Height; }
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")); } }
public SolidObj(double x, double y, string spritepath, PhysObj physicsobject, int depth, int scale) { X = x; Y = y; PhysicsObject = physicsobject; PhysicsObject.X = (float)x; PhysicsObject.Y = (float)y; SpritePath = spritepath; Scale = scale; Depth = depth; ID = Objects.GetID(); System.Drawing.Bitmap bit = new System.Drawing.Bitmap(spritepath); Width = bit.Width; Height = bit.Height; }
public CharObj(double x, double y, List <SpriteObj> animationlist, PhysObj physicsobject, int depth, int speed, int scale, bool isplayer) { X = x; Y = y; AnimationList = animationlist; PhysicsObject = physicsobject; PhysicsObject.X = (float)x; PhysicsObject.Y = (float)y; isPlayer = isplayer; Scale = scale; Speed = speed; Depth = depth; ID = Objects.GetID(); CurrentAnimation = 0; }
static public void CreateCharObj(double x, double y, List <SpriteObj> animationlist, PhysObj physicsobject, int depth, int speed, int scale, bool isplayer, string name = "null") { CharObj CharObject = new CharObj(x, y, animationlist, physicsobject, depth, speed, scale, isplayer); Objects.CharObjList.Add(CharObject); foreach (SpriteObj spriteobject in animationlist) { spriteobject.Speed = speed; } if (name == "null") { Objects.NameIDObjList.Add(new NameIDObj(CharObject.ID, CharObject.ID, "CharObj")); } else { Objects.NameIDObjList.Add(new NameIDObj(CharObject.ID, name, "CharObj")); } }