Пример #1
0
 public Sparkle(World world)
     : base(world)
 {
     this.SpriteName = "sparkle";
     this.IsGravityDisabled = false;
     frames = 0;
     this.DeleteMarker = gameObj => gameObj.Position.Y > 480;
 }
Пример #2
0
 public RectangleBlock(World world)
     : base(world)
 {
     this.IsGravityDisabled = true;
     sticker = null;
     this.Shape = new WrapperRectangle(this);
     this.CollisionDetector = new RectangleCollisionDetector(this);
 }
Пример #3
0
 public StickyBirdObj(World world)
     : base(world)
 {
     this.SpriteName = "bird2";
     shape = new WrapperCircle(this, 25f);
     collisionDetector = new CircleCollisionDetector(this, shape);
     IsAlive = true;
     InitAnimator();
     this.UpdateAnchorPoint(27.5f, 27.5f);
 }
Пример #4
0
 public DynamicGameObject(World world)
 {
     velocity = new Vector2(0, 0);
     center = new Vector2(0, 0);
     mass = 1;
     frictionCoeff = 1f;
     this.world = world;
     angularVelocity = 0f;
     RequiredCameraPosition = new Vector2(0, 0);
     this.Type = ObjectType.Balance;
 }
Пример #5
0
 public LineObject(World w, string sprite)
     : base(w)
 {
     this.spriteName = sprite;
     this.IsGravityDisabled = true;
     lineStart = new Vector2();
     lineEnd = new Vector2();
     deltaVector = new Vector2(0, 0);
     normalVector = new Vector2(0, 0);
     this.Shape = new WrapperLine(this);
     this.CollisionDetector = new LineCollisionDetector(this);
 }
Пример #6
0
 public StarObject(World currentWorld)
     : base(currentWorld, 25/2)
 {
     this.SpriteName = "stars";
     this.IsGravityDisabled = true;
     rotatorObj = new DynamicGameObject(currentWorld);
     rotatorObj.IsGravityDisabled = true;
     rotatorObj.SpriteName = "rotator";
     rotatorObj.Rotation = (float) (RandomUtil.Random.NextDouble() * Math.PI * 2);
     rotatorObj.AngularVelocity = 0.15f;
     this.Type = ObjectType.Star;
     //InitAnimator();
 }
Пример #7
0
 public LineObject(World w)
     : this(w, "line")
 {
 }
Пример #8
0
 public Spikes(World world)
     : base(world)
 {
     this.SpriteName = "spikes";
     this.Type = ObjectType.Deadly;
 }
Пример #9
0
 public RedBall(World world)
     : base(world)
 {
     this.spriteName = "redbean";
     this.IsGravityDisabled = true;
 }
Пример #10
0
 public WoodBlock(World world, bool half)
     : base(world)
 {
     this.SpriteName = half ? "woodh" : "stone";
 }
Пример #11
0
 public WoodBlock(World world)
     : this(world, false)
 {
 }
Пример #12
0
 public Nest(World world)
     : base(world)
 {
     this.SpriteName = "nest";
     this.Type = ObjectType.Nest;
 }
Пример #13
0
 public ElectricFence(World w)
     : base(w, "lighting")
 {
     this.Type = ObjectType.Deadly;
     this.IsGravityDisabled = true;
 }
Пример #14
0
 public CircleObject(World world, int radius)
     : base(world)
 {
     shape = new WrapperCircle(this, radius);
     collisionDetector = new CircleCollisionDetector(this, shape);
 }