public void ProcessObject(List <List <Object> > matrix) { ScalePlatform a = new ScalePlatform(width, 16 * x1, 16 * y1, 16 * (y3 + 1)); ScalePlatform b = new ScalePlatform(width, 16 * x2, 16 * y2, 16 * (y3 + 1)); a.SetPartner(b); b.SetPartner(a); matrix[x1].Add(a); matrix[x2].Add(b); }
public void Update() { ScalePlatform partner = ((ScalePlatform)Block).partner; if (partner.Position.Y < ymin) { HUD.SCORE[HUD.currentPlayer] += HotDAMN.SCORE_BREAK_SCALE_PLATFORMS; HUD.level.AddParticle(new Score(new Vector2(partner.Position.X + Block.Position.X / 2, partner.Position.Y), HotDAMN.SCORE_BREAK_SCALE_PLATFORMS)); Block.State = new SPlatformFalling(Block, width); partner.State = new SPlatformFalling(partner, width); Block.CollisionHandler = new StaticBlockCollisionHandler(Block); partner.CollisionHandler = new StaticBlockCollisionHandler(partner); } Block.Hitbox.Cycle(); SetHitbox(); }
public void SetPartner(ScalePlatform partner) { this.partner = partner; }