public RockHook(Vector2 position, Vector2 spriteSize, string textureString, string secondTextureString, float ropeLength) : base(position, spriteSize) { { Speed = new Vector2(0); Mass = 10; Visible = true; Movable = false; TextureString = textureString; if (ropeLength == 0) { ropeLength = 200; } _ropeLength = ropeLength; Vector2 scale = new Vector2(120.0f / 282.0f, 153.0f / 168.0f); Rope = new HangingRope(position + scale * spriteSize, new Vector2(44, ropeLength), secondTextureString) { Active = true }; Initialize(); } }
public void SetRope(HangingRope rope) { this.Rope = rope; }