private MultiCollider LeafCollider(Vector2 position, Size size, bool centered,Direction direction) { MultiCollider climbCollider = new MultiCollider(position, size, centered, direction); climbCollider.AddCollider(new Collider(new Rectangle(0, leafSize.Height / 2 - 10, leafSize.Width - 20, 20), false)); climbCollider.AddCollider(new Collider(new Rectangle((int)(leafSize.Width * 0.2f), (int)(leafSize.Height * 0.1f), (int)(leafSize.Width * 0.5f), leafSize.Height / 4), false)); return climbCollider; }
private MultiCollider BananaCollider(Vector2 position, Size size, bool centered, Direction direction) { MultiCollider climbCollider = new MultiCollider(position, size, centered, direction); climbCollider.AddCollider(new Collider(new Rectangle(1, 20, 15, 14), false)); climbCollider.AddCollider(new Collider(new Rectangle(2, 1, 22, 17), false)); climbCollider.AddCollider(new Collider(new Rectangle(2, 35, 19, 14), false)); climbCollider.AddCollider(new Collider(new Rectangle(8, 50, 23, 15), false)); return climbCollider; }
private MultiCollider CreateJumpCollider(Vector2 position, Size size, bool centered, Direction direction) { MultiCollider jumpCollider = new MultiCollider(position, size, centered, direction); jumpCollider.AddCollider(new Collider(new Rectangle(0, monkeySize.Height / 2 - 25, monkeySize.Width, 40), false)); return jumpCollider; }
private MultiCollider CreateClimbCollider(Vector2 position, Size size, bool centered,Direction direction) { MultiCollider climbCollider = new MultiCollider(position, size, centered, direction); climbCollider.AddCollider(new Collider(new Rectangle(monkeySize.Width / 2 - 20, 0, 40, monkeySize.Height), false)); return climbCollider; }