//--------------------------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------Load Content------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------------------------- protected void LoadElement(int element_reference) { Load_TextBox(); Load_Interaction_Symbol(); // ---------------------------------------------------------99------------------------------------------------------- if (element_reference == 99) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.05f, true); //secondary_Texture = content.Load<Texture2D>("Sprites/Element/99/Block"); sprite.PlayAnimation(animation_0); sprite_Opacity = 1; boundingBox_Outer = new Rectangle(XPos - Tiles.Width, YPos - Tiles.Height * 15, Tiles.Width * 3, Tiles.Height * 30); //secondary_Rectangle = new Rectangle(XPos+ 25, YPos +25, secondary_Texture.Width, secondary_Texture.Height); //secondary_Opacity = 1; } // ---------------------------------------------------------100------------------------------------------------------- if (element_reference == 100) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.05f, false); animation_2 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_2"), 0.1f, true); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos - animation_0.FrameWidth / 2 + 200, YPos - animation_0.FrameHeight + 350, Tiles.Width, Tiles.Height * 2); } // ---------------------------------------------------------101------------------------------------------------------- if (element_reference == 101) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.05f, false); animation_2 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_2"), 0.05f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos - animation_0.FrameWidth / 2 + 200, YPos - animation_0.FrameHeight + 350, Tiles.Width, Tiles.Height * 2); } // ---------------------------------------------------------102------------------------------------------------------- if (element_reference == 102) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, false); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------103------------------------------------------------------- if (element_reference == 103) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, false); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------104------------------------------------------------------- if (element_reference == 104) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, false); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------105------------------------------------------------------- if (element_reference == 105) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, false); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------106------------------------------------------------------- if (element_reference == 106) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, false); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); animation_2 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_2"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------107------------------------------------------------------- if (element_reference == 107) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, animation_0.FrameWidth, animation_0.FrameHeight); } // ---------------------------------------------------------108------------------------------------------------------- if (element_reference == 108) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, Tiles.Width, Tiles.Height); } // ---------------------------------------------------------109------------------------------------------------------- if (element_reference == 109) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); animation_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_1"), 0.1f, false); animation_2 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_2"), 0.1f, false); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos - 100, YPos - 200, Tiles.Width + 200, Tiles.Height + 200); boundingBox_Outer = new Rectangle(XPos - 300, YPos - 250, animation_0.FrameWidth + 350, animation_0.FrameHeight); } // ---------------------------------------------------------110------------------------------------------------------- if (element_reference == 110) { animation_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/" + element_reference + "/" + element_reference + "_0"), 0.1f, true); sprite.PlayAnimation(animation_0); sprite_Opacity = 0; boundingBox_Inner = new Rectangle(XPos, YPos, Tiles.Width, Tiles.Height); } }
private void Load_Interaction_Symbol() { //Load Interaction Symbol interact_0 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/Interact/00"), 0.05f, false); interact_1 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/Interact/01"), 0.05f, false); interact_2 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/Interact/02"), 0.05f, true); interact_3 = new Base_Components.Animation(content.Load<Texture2D>("Sprites/Element/Interact/03"), 0.05f, false); interact_Ani.PlayAnimation(interact_0); interact_Dia_Ani.PlayAnimation(interact_2); }
public void LoadContent() { // Load animated textures. idleAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Idle"), 0.2f, true); walkAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Walking"), 0.11f, true); jumpAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Jumping"), 0.08f, false); crawlingAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Crawling"), 0.1f, true); runAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Running"), 0.12f, true); crouch_IdleAnimation = new Base_Components.Animation(Game_Mode.Content.Load<Texture2D>("Sprites/Player/" + outfit_Set + "/Crouch_Idle"), 0.12f, true); }