var EHDI = EHDI || Object.create(null); EHDI.components = EHDI.components || Object.create(null); EHDI.components.Bush = function() { EHDI.aka.Container.call(this); var wolfRandomizer = (Math.random() > 0.49) ? 1 : 2; this.sprite = new EHDI.aka.Sprite(EHDI.Assets.images["bush" + wolfRandomizer]); this.sprite.anchor.x = 0.5; this.sprite.anchor.y = 1; this.addChild(this.sprite); this.collider = EHDI.displays.FillRectangle(0xAA0000, 0, 0, 75, 50, 0); this.collider.x = -this.sprite.width * 0.25; this.collider. anchor.x = 0.5; this.collider.anchor.y = 1; this.collider.visible = false; this.addChild(this.collider); }; EHDI.components.Bush.prototype = Object.create(EHDI.aka.Container.prototype);