public Player(DrawablePhysicsObject playerBody, ContentManager Content) { this.playerBody = playerBody; this.playerBody.body.BodyType = BodyType.Dynamic; this.playerBody.body.FixedRotation = true; this.playerBody.body.Awake = true; this.jumpSound = Content.Load<SoundEffect>("Audio/JumpAlpaca"); }
public Tree(DrawablePhysicsObject treeBody, DrawablePhysicsObject platformBody ) { this.treeBody = treeBody; this.treeBody.body.BodyType = BodyType.Static; this.treeBody.body.FixedRotation = true; // De x-positie is een willekeurig getal over de breedde van de platform waar de boom op komt int positionX = this.random.Next((int)platformBody.Position.X, (int)(platformBody.Position.X + platformBody.Size.X / 2) - (int)this.treeBody.Size.X); // De y-positie is precies op het platform waar de boom op komt int positionY = (int)((platformBody.Position.Y - (this.treeBody.Size.Y / 2) - platformBody.Size.Y / 2) + 1); this.treeBody.Position = new Vector2(positionX, positionY); }
public Platform(DrawablePhysicsObject platformBody) { this.platformBody = platformBody; this.platformBody.body.BodyType = BodyType.Static; this.platformBody.body.FixedRotation = true; }
public Tree(DrawablePhysicsObject treeBody) { this.treeBody = treeBody; this.treeBody.body.BodyType = BodyType.Static; this.treeBody.body.FixedRotation = true; }