public GameObject CreateHouse(Color houseColor, Vector2 houseLocation) { GameObject house = new GameObject(base.Game, houseLocation, 50, 50); GameObjectView houseView = new GameObjectView(base.Game, Content.House, houseColor, SpriteBatch, house, ZIndexManager.getZIndex(ZIndexManager.drawnItemOrders.house)); base.Game.Components.Add(house); base.Game.Components.Add(houseView); return house; }
private void addAnimationView(Vector2 position, AnimatedTextureInfo animTextInfo, Color color, float zIndex) { GameObject animationObject = new GameObject(Game, position, animTextInfo.WindowSize.X, animTextInfo.WindowSize.Y); Game.Components.Add(animationObject); var animationView = new AnimationView(Game, animTextInfo.Content, color, spriteBatch, animTextInfo, animationObject, zIndex); animationView.AnimationFinished += HandleAnimationFinished; Game.Components.Add(animationView); currentAnimations.Add(animationView, animationObject); }