public static void loadContent(ContentManager Content) { CreatureModels = new List <CharacterModel>(); CreatureShadows = new List <BasicModel>(); NestModels = new List <BasicModel>(); UpgradeModels = new List <BasicModel>(); WallModels = new List <BasicModel>(); HexagonModels = new List <BasicModel>(); GUI_Elements = new List <Texture2D>(); Rock_Texture = new List <Texture2D>(); Gold_Texture = new List <Texture2D>(); Diamond_Texture = new List <Texture2D>(); GrowModels = new List <BasicModel>(); pixel = Content.Load <Texture2D>("TEST"); cursor = Content.Load <Texture2D>("Textures/GUI/Cursor//cursor_48_01"); GUI_Fonts = new List <SpriteFont>(); //Augusta, AugustaBold, AugustaBold2, AugustaHeadline, AugustaTextField, AusgustaText #region Fonts GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//Augusta")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//AugustaBold")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//AugustaBold_2")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//Augusta_Headline")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//Augusta_TextField")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//Augusta_Text")); GUI_Fonts.Add(Content.Load <SpriteFont>("Fonts//Augusta_Small")); #endregion //Dummy GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Dummy//dummy_texture_1366x768")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//info_aca_260x265")); //Nest, Graveyard, Farm, Temple, Entrance, #region Building GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Buildings//ant")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Buildings//skeleton")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Buildings//farm")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Buildings//tempel")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Buildings//entrance")); #endregion //FrameHUD, ButtonHUD, BackgroundHUD, MinimapHUD, RessoucesFrame, RessoucesHUD, RessoucesPapier, InfoHUD #region HUD GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//screen_frame_iron_96x24")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//screen_frame_iron_110x475_01")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//screen_background_iron_01")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Minimap//minimap_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_frame_singel_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_singel_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_papier_singel_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen//info_frame_iron_247x160")); #endregion //Food, Gold, Mana #region Ressources GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_foot")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_gold")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Ressources//res_mana")); #endregion //Mine, Room, MergeRoom, DeleteRoom, Build, Upgrade GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Functions//mine")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Functions//room")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Functions//merge")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Functions//delete")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Functions//build")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Upgrades//flag")); //DamageUpgrade, LifeUpgrade, SpeedUpgrade #region Upgrades GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Upgrades//upgrade_deg")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Upgrades//upgrade_lev")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Upgrades//upgrade_spd")); #endregion //LeftChain, RightChain, SpecialChain, Pole #region Special-GUI Elements GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Elements//chain_short_left_48x256")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Elements//chain_short_right_48x256")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Elements//chain_special_24x60")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Elements//pole_iron_500x8")); #endregion //LeftHUD, RightHUD, BottomHUD, TopHUD, RessoucesHUD, InfoHUD GUI_Elements.Add(Content.Load <Texture2D>("Left_HUD_Test")); GUI_Elements.Add(Content.Load <Texture2D>("Right_HUD_Test")); GUI_Elements.Add(Content.Load <Texture2D>("Bottom_HUD_Test")); GUI_Elements.Add(Content.Load <Texture2D>("Top_HUD_Test")); //StartBackgroundHUD, BlackBackgoundHUD, TextFrame, TextBlance, UnderlordHUD, UnderlordFireLogo, UnderlordBurnedLogo #region Start-GUI Elements GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//start_background_1366x768")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//blackground_1366x768")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//start_text_chains_293x72")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//start_text_blance_293x96")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//start_underlord_frame_800x350")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//underlord_fire_800x525")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Start//underlord_burned_800x525")); #endregion //TextFieldSmall, TextFieldMiddle, TextFieldBig, BookField, TextArrow, ChainSmall, ChainMiddle, ChainBig, ChainLarge, #region Main-Menu-GUI Elements GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//text_small_288x72")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//text_middle_384x96")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//text_big_512x128")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//book_911x512")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//text_back_384x96")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Chains//chain_small_288x64")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Chains//chain_middle_384x84")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Chains//chain_big_512x100")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/Chains//chain_large_911x237")); #endregion //FullScreenButton #region Setting-GUI Elements GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//scroll_88x76")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//scroll_up_88x76")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//scroll_down_88x76")); #endregion //Menu, StartGame, QuitGame, Highscore, Tutorial, ReturnAccept, ReturnDecline GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); GUI_Elements.Add(Content.Load <Texture2D>("TEST")); //Spells (Fireball, SummonImp) GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Spells//fireball")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Spells//imp")); //Tutorials GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/GUI/TextFields//tutorial_middle_637x150")); //TutorialButtons GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); GUI_Elements.Add(Content.Load <Texture2D>("Textures/HUD/Screen/info_frame_iron_260x265")); Rock_Texture.Add(Content.Load <Texture2D>("Textures/Rock//wall_rock_broken_01_TEXT")); Rock_Texture.Add(Content.Load <Texture2D>("Textures/Rock//wall_rock_broken_02_TEXT")); Rock_Texture.Add(Content.Load <Texture2D>("Textures/Rock//wall_rock_broken_03_TEXT")); Gold_Texture.Add(Content.Load <Texture2D>("Textures/Gold//wall_gold_broken_01_TEXT")); Gold_Texture.Add(Content.Load <Texture2D>("Textures/Gold//wall_gold_broken_02_TEXT")); Gold_Texture.Add(Content.Load <Texture2D>("Textures/Gold//wall_gold_broken_03_TEXT")); Diamond_Texture.Add(Content.Load <Texture2D>("Textures/Diamond//wall_diamond_broken_01_TEXT")); Diamond_Texture.Add(Content.Load <Texture2D>("Textures/Diamond//wall_diamond_broken_02_TEXT")); Diamond_Texture.Add(Content.Load <Texture2D>("Textures/Diamond//wall_diamond_broken_03_TEXT")); WallModels.Add(new BasicModel(Content.Load <Model>("Models/Wall/sand_Wall_HEX_01"))); WallModels.Add(new BasicModel(Content.Load <Model>("Models/Wall/sand_Wall_HEX_01"))); WallModels.Add(new BasicModel(Content.Load <Model>("Models/Wall/sand_Wall_HEX_01"))); WallModels.Add(new BasicModel(Content.Load <Model>("Models/Wall/sand_Wall_HEX_01"))); WallModels[(int)WallTyp.Stone].Texture = Content.Load <Texture2D>("Textures/Rock//wall_rock_TEXT"); WallModels[(int)WallTyp.Gold].Texture = Content.Load <Texture2D>("Textures/Gold//wall_gold_TEXT"); WallModels[(int)WallTyp.Diamond].Texture = Content.Load <Texture2D>("Textures/Diamond//wall_diamond_TEXT"); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels.Add(new BasicModel(Content.Load <Model>("Models/Floor//floorSand_HEX_03"))); HexagonModels[(int)HexTyp.Sand].Texture = Content.Load <Texture2D>("Textures/Floor//floor_stone_TEXT"); HexagonModels[(int)HexTyp.Stone].Texture = Content.Load <Texture2D>("Textures/Floor//floor_stone_TEXT"); HexagonModels[(int)HexTyp.BeetleNest].Texture = Content.Load <Texture2D>("Textures/Nest//nest_orange_TEXT"); HexagonModels[(int)HexTyp.Graveyard].Texture = Content.Load <Texture2D>("Textures/Farm//farm_dirt_TEXT"); HexagonModels[(int)HexTyp.Temple].Texture = Content.Load <Texture2D>("Textures/Tempel//tempel_white_TEXT"); HexagonModels[(int)HexTyp.Farm].Texture = Content.Load <Texture2D>("Textures/Farm//farm_dirt_TEXT"); NestModels.Add(new BasicModel(Content.Load <Model>("Models/Nest//nest_GEO_01"))); NestModels.Add(new BasicModel(Content.Load <Model>("Models/Entrance//entrance_GEO_01"))); NestModels.Add(new BasicModel(Content.Load <Model>("Models/Tempel//tempel_house_GEO_01"))); NestModels.Add(new BasicModel(Content.Load <Model>("Models/Farm//farm_house_GEO_01"))); NestModels.Add(new BasicModel(Content.Load <Model>("Models/Graveyard//graveyard_house_GEO_01"))); NestModels[(int)NestTyp.Beetle].Texture = Content.Load <Texture2D>("Textures/Nest//nest_orange_TEXT"); //NestModels[(int)NestTyp.Entrance].Texture = Content.Load<Texture2D>("Textures//nest_orange_TEXT"); //NestModels[(int)NestTyp.Skeleton].Texture = Content.Load<Texture2D>("Textures//nest_orange_TEXT"); //NestModels[(int)NestTyp.Temple].Texture = Content.Load<Texture2D>("Textures/Tempel//tempel_white_TEXT"); //NestModels[(int)NestTyp.Farm].Texture = Content.Load<Texture2D>("Textures//nest_orange_TEXT"); UpgradeModels.Add(new BasicModel(Content.Load <Model>("Models/Flags//flag_Deg_GEO_01"))); UpgradeModels.Add(new BasicModel(Content.Load <Model>("Models/Flags//flag_Lve_GEO_01"))); UpgradeModels.Add(new BasicModel(Content.Load <Model>("Models/Flags//flag_Spd_GEO_01"))); GrowModels.Add(new BasicModel(Content.Load <Model>("Models/Farm//farm_floor_GEO_01"))); GrowModels.Add(new BasicModel(Content.Load <Model>("Models/Tempel//tempel_floor_GEO_01"))); GrowModels.Add(new BasicModel(Content.Load <Model>("Models/Graveyard//graveyard_floor_GEO_01"))); TargetFlag = new BasicModel(Content.Load <Model>("Models/Flags//flag_target_GEO_01")); FarmInput = new BasicModel(Content.Load <Model>("Models/Farm//farm_input_GEO_01")); TempelStone = new BasicModel(Content.Load <Model>("Models/Tempel//tempel_manaStone_GEO_01")); TempelBath = new BasicModel(Content.Load <Model>("Models/Tempel//tempel_manaBath_GEO_01")); // Add ant character CharacterModel ant = new CharacterModel(Content.Load <Model>("AnimationModels/Ant//ant_simple_walk_ANI_01")); ant.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Ant//ant_simple_fight_ANI_01"))); CreatureModels.Add(ant); CreatureShadows.Add(new BasicModel(Content.Load <Model>("AnimationModels/Ant//ant_shadow_GEO_01"))); // Add knight character CharacterModel knight = new CharacterModel(Content.Load <Model>("AnimationModels/Knight//knight_simple_walk_ANI_01")); knight.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Knight//knight_simple_fight_ANI_01"))); knight.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Knight//knight_simple_flying_ANI_01"))); CreatureModels.Add(knight); CreatureShadows.Add(new BasicModel(Content.Load <Model>("AnimationModels/Knight//knight_shadow_GEO_01"))); // Add HQ character CreatureModels.Add(new CharacterModel(Content.Load <Model>("AnimationModels/HQ//devil_head_GEO_01"))); HQMouthModel = new BasicModel(Content.Load <Model>("AnimationModels/HQ//devil_mouth_GEO_01")); CreatureShadows.Add(new BasicModel(Content.Load <Model>("AnimationModels/Skeleton//skeleton_shadow_GEO_01"))); // Add skeleton character CharacterModel skeleton = new CharacterModel(Content.Load <Model>("AnimationModels/Skeleton//skeleton_simple_walk_ANI_01")); skeleton.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Skeleton//skeleton_simple_fight_ANI_01"))); CreatureModels.Add(skeleton); CreatureShadows.Add(new BasicModel(Content.Load <Model>("AnimationModels/Skeleton//skeleton_shadow_GEO_01"))); // Add imp character ImpModel = new ImpModel(Content.Load <Model>("AnimationModels/Imp//imp_simple_walk_ANI_01")); ImpModel.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Imp//imp_simple_grab_ANI_01"))); ImpModel.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Imp//imp_simple_praying_ANI_01"))); ImpModel.AddClip(new CharacterModel(Content.Load <Model>("AnimationModels/Imp//imp_simple_harvesting_ANI_01"))); ImpShadow = new BasicModel(Content.Load <Model>("AnimationModels/Imp//imp_shadow_GEO_01")); // Add torch model TorchModel = new BasicModel(Content.Load <Model>("Models/Torch//torch_pillar_HEX_01")); // Add torch fire model TorchFireModel = Content.Load <Model>("Models/Torch//torch_fire_HEX_01"); // Add god' ray model EntranceRayModel = new LightModel(Content.Load <Model>("Models/Entrance/entrance_rays_GEO_01")); FireBall = new FireBallModel(Content.Load <Model>("Models/Fire/fireball_GEO_01")); FireBallModel fire1 = new FireBallModel(Content.Load <Model>("Models/Fire/fire_GEO_01")); FireBallModel fire2 = new FireBallModel(Content.Load <Model>("Models/Fire/fire_GEO_01")); FireBallModel fire3 = new FireBallModel(Content.Load <Model>("Models/Fire/fire_GEO_01")); FireBall.Fires.Add(fire1); FireBall.Fires.Add(fire2); FireBall.Fires.Add(fire3); }
public void DrawModel(Renderer.Camera camera, Vector3 drawPosition) { if (currentDrawPosition != drawPosition) { currentDrawPosition = drawPosition; } Matrix modelMatrix = Matrix.Identity * Matrix.CreateScale(1) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(drawPosition + new Vector3(0.0f, 0.0f, 0)); Logic.Vars_Func.getHexagonModell(typ).Color = drawColor; Logic.Vars_Func.getHexagonModell(typ).Draw(camera, modelMatrix, !(drawColor.Equals(Color.White)), isEnlightend, lightPower); if (obj != null) { obj.DrawModel(camera, drawPosition, drawColor, isEnlightend, lightPower); } if (obj == null && imps.Count > 0) { imps[0].DrawModel(camera, drawPosition, drawColor, isEnlightend, lightPower); } //if (obj != null && imps.Count > 0) imps[0].DrawModel(camera, drawPosition, drawColor, isEnlightend, lightPower); if (targetFlag) { Matrix modelMatrix2 = Matrix.Identity * Matrix.CreateScale(1) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(drawPosition); Logic.Vars_Func.getTargetFlag().Color = drawColor; Logic.Vars_Func.getTargetFlag().Draw(camera, modelMatrix2, !(drawColor.Equals(Color.White)), isEnlightend, lightPower); } switch (growObject) { case Logic.Vars_Func.GrowObject.Farm: drawPosition = new Vector3(drawPosition.X, drawPosition.Y, drawPosition.Z + Logic.Vars_Func.getGrowObjectParams(growObject).X); Matrix farmModelMatrix = Matrix.Identity * Matrix.CreateScale(Logic.Vars_Func.getGrowObjectParams(growObject).Y) * Matrix.CreateRotationX(Logic.Vars_Func.getGrowObjectParams(growObject).Z) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(drawPosition); Logic.Vars_Func.getGrowModel(growObject).Color = drawColor; Logic.Vars_Func.getGrowModel(growObject).Draw(camera, farmModelMatrix, !(drawColor.Equals(Color.White)), isEnlightend, lightPower / 2); break; case Logic.Vars_Func.GrowObject.Temple: //drawPosition = new Vector3(drawPosition.X, drawPosition.Y, drawPosition.Z + Logic.Vars_Func.getGrowObjectParams(growObject).X); //Matrix templeModelMatrix = Matrix.Identity * //Matrix.CreateScale(Logic.Vars_Func.getGrowObjectParams(growObject).Y) * //Matrix.CreateRotationX(Logic.Vars_Func.getGrowObjectParams(growObject).Z) * //Matrix.CreateRotationY(0) * //Matrix.CreateRotationZ(0) * //Matrix.CreateTranslation(drawPosition); //Logic.Vars_Func.getGrowModel(growObject).Color = drawColor; //Logic.Vars_Func.getGrowModel(growObject).Draw(camera, templeModelMatrix, false, isEnlightend, lightPower/2); break; case Logic.Vars_Func.GrowObject.Graveyard: drawPosition = new Vector3(drawPosition.X, drawPosition.Y, drawPosition.Z + Logic.Vars_Func.getGrowObjectParams(growObject).X); Matrix graveyardModelMatrix = Matrix.Identity * Matrix.CreateScale(Logic.Vars_Func.getGrowObjectParams(growObject).Y) * Matrix.CreateRotationX(Logic.Vars_Func.getGrowObjectParams(growObject).Z) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(drawPosition); Logic.Vars_Func.getGrowModel(growObject).Color = drawColor; Logic.Vars_Func.getGrowModel(growObject).Draw(camera, graveyardModelMatrix, !(drawColor.Equals(Color.White)), isEnlightend, lightPower / 2); break; case Logic.Vars_Func.GrowObject.length: break; } #region Draw Fireball if (fireBalls.Count > 0) { System.Diagnostics.Debug.WriteLine(fireBalls.Count); for (int i = fireBalls.Count - 1; i >= 0; i--) { FireBallModel fireBall = fireBalls[i]; // Draw the fireball Vector3 fireBallPostion = new Vector3(drawPosition.X, drawPosition.Y, drawPosition.Z + fireBall.Z); Matrix fireBallMatrix = Matrix.Identity * Matrix.CreateScale(fireBall.Scale) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(fireBall.RotationZ) * Matrix.CreateTranslation(fireBallPostion); fireBall.Color = drawColor; fireBall.Draw(camera, fireBallMatrix); // Draw the all the ball's fire foreach (FireBallModel fire in fireBall.Fires) { Vector3 firePositon = new Vector3(fireBallPostion.X, fireBallPostion.Y, fireBallPostion.Z + fire.Z); Matrix fireMatrix = Matrix.Identity * Matrix.CreateScale(fire.Scale) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(fire.RotationZ) * Matrix.CreateTranslation(firePositon); fire.Color = drawColor; fire.Draw(camera, fireMatrix); } if (fireBallPostion.Z < 0) { fireBall.Remove(); fireBalls.Remove(fireBall); } } } #endregion if (!isEntrance && !isHQ) { foreach (FireModel fire in fireModels) { if (fire != null) { Matrix fireModelMatrix = Matrix.Identity * Matrix.CreateScale(1) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(drawPosition + new Vector3(0.0f, 0.0f, fire.Z)); fire.Draw(camera, fireModelMatrix); } } if (isStartLight) { Logic.Vars_Func.getTorchModel().Color = drawColor; Logic.Vars_Func.getTorchModel().Draw(camera, modelMatrix, !(drawColor.Equals(Color.White)), isEnlightend, lightPower / 2); } } else if (isEntrance) { //Draw God's Ray Matrix rayModelMatrix = Matrix.Identity * Matrix.CreateScale(Logic.Vars_Func.getEntranceRayModel().Scale) * Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0) * Matrix.CreateRotationZ(camera.Rotation + Logic.Vars_Func.getEntranceRayModel().RotationZ) * Matrix.CreateTranslation(drawPosition + new Vector3(0.0f, 0.0f, Logic.Vars_Func.getEntranceRayModel().PositionZ)); Logic.Vars_Func.getEntranceRayModel().Draw(camera, rayModelMatrix); } }