/// <summary> /// Animation Player for playing AnimatedEntity in a UI context /// </summary> /// <param name="animatedEntity">can be null to indicate the animation is not loaded yet</param> /// <param name="position"></param> /// <param name="scale"></param> public AnimationPlayer(AnimatedEntity animatedEntity, Point position, float scale = 1f) { AnimatedEntity = animatedEntity; AnimatedEntity.Position = position.ToVector2(); Position = position; Scale = scale; }
public void LoadContent(MainPlayScreen screen) { this.screen = screen; var animationSpriteSheet = CONTENT_MANAGER.Sprites["animation"]; font = MainPlayScreen.font; var frames = JsonConvert.DeserializeObject <List <KeyValuePair <string, Rectangle> > >(File.ReadAllText(@"Content/sprite/animation.json")); var anims = new List <Animation>(); var animnames = Enum.GetNames(typeof(AnimationName)); foreach (var an in animnames) { anims.Add(LoadAnimation(an, frames)); } animatedEntity = new AnimatedEntity(IsoPos, VT2.Zero, Color.White, 0.4f, Constant.SCALE); animatedEntity.LoadContent(animationSpriteSheet); animatedEntity.AddAnimation(anims); animatedEntity.PlayAnimation(AnimationName.idle_right.ToString()); walksfx = CONTENT_MANAGER.Sounds["footstep"].CreateInstance(); walksfx.Volume = 0f; leversfx = CONTENT_MANAGER.Sounds["lever"].CreateInstance(); floorswitchpressedsfx = CONTENT_MANAGER.Sounds["switch_pressed"].CreateInstance(); floorswitchreleasedsfx = CONTENT_MANAGER.Sounds["switch_released"].CreateInstance(); timer = new Timer(); }
public Unit(UnitType unittype, AnimatedEntity anim, Owner owner, Guid guid, int hp = 10) { unitType = unittype; animation = anim; Owner = owner; hitPoint = hp; fuel = _Gas[unitType]; ammo = _Ammo[unitType]; actionpoint = _ActionPoint[unitType]; this.guid = guid; }
public override void OnAddedToScene() { base.OnAddedToScene(); var coneTexture = Scene.Content.LoadTexture(ContentPaths.Scoop_Cone); coneDecal = Scene.AddEntity(new SpriteEntity(coneTexture, Constants.Layer_WeaponOver, 0.5f)); this.coneSpring = coneDecal.AddComponent(new EntitySpringComponent(this, weaponMountOffset, 5)); coneDecal.ToggleVisible(this.defaultVisible); shootFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shootFX.ToggleVisible(this.defaultVisible); }
public override void OnAddedToScene() { base.OnAddedToScene(); var coneTexture = Scene.Content.LoadTexture(ContentPaths.Scoop_Cone); coneDecal = Scene.AddEntity(new SpriteEntity(coneTexture, Constants.RenderLayer_Truck, 0.5f)); coneDecal.ToggleVisible(defaultVisible); coneSpring = coneDecal.AddComponent(new EntitySpringComponent(this, weaponMountOffset, 5)); shootFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shootFX.ToggleVisible(defaultVisible); playerMove = weaponComponent.GetComponent <PlayerMovementComponent>(); }
public override void OnAddedToScene() { base.OnAddedToScene(); var popsicleTexture = Scene.Content.LoadTexture(ContentPaths.Popsicle + "Popsicle_Basic.png"); this.loadedPopsicle = Scene.AddEntity(new SpriteEntity(popsicleTexture, Constants.Layer_WeaponOver, 0.5f)); this.loadedPopsicle.ToggleVisible(this.defaultVisible); this.shatterFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shatterFX.ToggleVisible(false); shatterFX.animator.RenderLayer = Constants.Layer_WeaponOver; shatterFX.animator.LayerDepth = 0.4f; shatterFX.animator.OnAnimationCompletedEvent += (s) => ReloadPopsicle(); }
public void CreateEntity(string _file, string _speaker, string _id) { speaker_label.GetComponent <Text>().text = _speaker; GameObject animated_fab_ = Resources.Load <GameObject>("Prefabs/Animations/" + _file); animated_panel = Instantiate(animated_fab_); animated_panel.name = animated_fab_.name + "_" + _id; animated_panel.transform.SetParent(dialogue_scene_panel.transform, true); Transform[] panels_ = GetScenePanelChildren(dialogue_scene_panel.transform); for (int i = 0; i < panels_.Length; i++) { if (panels_[i].name != animated_panel.name) { Destroy(panels_[i].gameObject);// destroys panel after it is no longer needed } } current_entity = animated_panel.GetComponent <AnimatedEntity>(); current_entity_animator = animated_panel.GetComponent <Animator>(); AnimatedEntity.EntityType entity_type_ = current_entity.entity_info.entity_type; speaker_label.GetComponent <Text>().color = current_entity.entity_info.speaker_color; }
public static Unit Create(UnitType unittype, Owner owner, int hp = 10, AnimationName startingAnimation = AnimationName.idle, Guid guid = default(Guid)) { AnimatedEntity animEntity = new AnimatedEntity(Vector2.Zero, Vector2.Zero, Color.White, LayerDepth.Unit); animEntity.LoadContent(CONTENT_MANAGER.animationSheets[unittype.GetSpriteSheetUnit(owner)]); #region declare animation frame Animation idle; Animation right; Animation up; Animation down; Animation done; switch (unittype) { case UnitType.TransportCopter: case UnitType.BattleCopter: animEntity.Origin = new Vector2(8, 16); idle = new Animation("idle", true, 3, string.Empty); for (int i = 0; i < 3; i++) { idle.AddKeyFrame(i * 64, 0, 64, 64); } right = new Animation("right", true, 4, string.Empty); for (int i = 0; i < 4; i++) { right.AddKeyFrame(i * 64, 64, 64, 64); } up = new Animation("up", true, 4, string.Empty); for (int i = 0; i < 4; i++) { up.AddKeyFrame(i * 64, 128, 64, 64); } down = new Animation("down", true, 4, string.Empty); for (int i = 0; i < 4; i++) { down.AddKeyFrame(i * 64, 192, 64, 64); } done = new Animation("done", true, 1, string.Empty); done.AddKeyFrame(0, 256, 64, 64); break; case UnitType.Fighter: case UnitType.Bomber: animEntity.Origin = new Vector2(8, 16); idle = new Animation("idle", true, 4, string.Empty); for (int i = 0; i < 4; i++) { idle.AddKeyFrame(i * 64, 0, 64, 64); } right = new Animation("right", true, 4, string.Empty); for (int i = 0; i < 4; i++) { right.AddKeyFrame(i * 64, 64, 64, 64); } up = new Animation("up", true, 4, string.Empty); for (int i = 0; i < 4; i++) { up.AddKeyFrame(i * 64, 128, 64, 64); } down = new Animation("down", true, 4, string.Empty); for (int i = 0; i < 4; i++) { down.AddKeyFrame(i * 64, 192, 64, 64); } done = new Animation("done", true, 1, string.Empty); done.AddKeyFrame(0, 256, 64, 64); break; default: idle = new Animation("idle", true, 4, string.Empty); for (int i = 0; i < 4; i++) { idle.AddKeyFrame(i * 48, 0, 48, 48); } right = new Animation("right", true, 4, string.Empty); for (int i = 0; i < 4; i++) { right.AddKeyFrame(i * 48, 48, 48, 48); } up = new Animation("up", true, 4, string.Empty); for (int i = 0; i < 4; i++) { up.AddKeyFrame(i * 48, 96, 48, 48); } down = new Animation("down", true, 4, string.Empty); for (int i = 0; i < 4; i++) { down.AddKeyFrame(i * 48, 144, 48, 48); } done = new Animation("done", true, 1, string.Empty); done.AddKeyFrame(0, 192, 48, 48); break; } #endregion animEntity.AddAnimation(idle, right, up, down, done); Unit result; if (guid == default(Guid)) { result = new Unit(unittype, animEntity, owner, hp); } else { result = new Unit(unittype, animEntity, owner, guid, hp); } result.Animation.PlayAnimation(startingAnimation.ToString()); return(result); }
public CreditsCutscene(WorldBase returnTo) : base("Content\\Cutscene\\creditsCutScene\\cutsceneCreditWorld", returnTo) { decorator.ambientSoundManager.requestMusicStop(); int distanceBetweenCreditEntries = 150; SoundEffect music = content.Load <SoundEffect>("Sounds/Music/credits_0"); musicInstance = music.CreateInstance(); musicInstance.Volume = MetaData.audioSettingMusic; List <String> creditsString = new List <string>(); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add("Credits"); creditsString.Add(" Programming, Design"); creditsString.Add("Samuel Richardson"); creditsString.Add(""); creditsString.Add(" Art"); creditsString.Add("Alexander 'Brotenko' Fassbender"); creditsString.Add("Aaron Richardson"); creditsString.Add("Samuel Richardson"); creditsString.Add(""); creditsString.Add(" Music"); creditsString.Add("Aaron Richardson"); creditsString.Add(""); creditsString.Add(" Special Thanks"); creditsString.Add(""); //creditsString.Add("All the people who played my game before release,\nwho put up with bugs and incomplete design,\nyou helped make the game what it is today.\n\nYou people are awesome."); creditsString.Add("You people are awesome.\n\nyou helped make the game what it is today.\nwho put up with bugs and incomplete design,\nAll the people who played my game before release,"); creditsString.Add(""); creditsString.Add("Sven 'Hoxeel' Lewandowski"); creditsString.Add("Family and Friends"); creditsString.Add("My local library"); creditsString.Add("Even though missing someone was inevitable, I'm sorry.\nSpecial Thanks to the person(s) I forgot to credit."); creditsString.Add(""); creditsString.Add("with my game.\ndear player, for spending time\n...and special thanks to you,"); creditsString.Add(""); int counter = 0; foreach (string credit in creditsString) { ParticleText text = new ParticleText(new Vector2(-300, distanceBetweenCreditEntries * -counter), this, int.MaxValue, credit); //text.drawContrast = true; text.font = content.Load <SpriteFont>("Temp_2"); addEntity(text); counter++; } cutsceneDuration = creditsString.Count * 125; cameraCommands.Add(new MovementCommand(new Vector2(0, -400), new Vector2(0, -400), 350)); cameraCommands.Add(new MovementCommand(new Vector2(0, -400), new Vector2(0, -400 + -distanceBetweenCreditEntries * creditsString.Count - 1200), creditsString.Count * 130)); AnimatedEntity animatedPlayer = new AnimatedEntity(); AnimatedEntity animatedFather = new AnimatedEntity(); AnimatedEntity animatedMother = new AnimatedEntity(); AnimatedEntity animatedSister = new AnimatedEntity(); animatedEntities.Add(animatedPlayer); animatedEntities.Add(animatedFather); animatedEntities.Add(animatedMother); animatedEntities.Add(animatedSister); animatedPlayer.animations.Add(new Animation(7 * 7, 500, Game1.player_default_animations.runTex, true)); animatedPlayer.animations[0].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(-1000, 27), new Vector2(-50, 27), 500)); animatedSister.animations.Add(new Animation(7 * 7, 500, Game1.player_girl_animations.runTex, true)); animatedSister.animations[0].drawFlipped = true; animatedSister.movement.Add(new MovementCommand(new Vector2(-1100, 25), new Vector2(-100, 25), 500)); animatedMother.animations.Add(new Animation(40, 50, content.loadTextureRange("Cutscene/StartingCutscene/mother_stand_", 0), true)); animatedMother.movement.Add(new MovementCommand(new Vector2(100, 27), new Vector2(100, 27), 500)); animatedFather.animations.Add(new Animation(40, 500, content.loadTextureRange("Cutscene/StartingCutscene/father_guitar_", 4), true)); animatedFather.movement.Add(new MovementCommand(new Vector2(-100, 27), new Vector2(-100, 27), 500)); EntityFire fire = new EntityFire(new Vector2(0, 47), this); entities.Add(fire); //timeIncrement = .0003f; }
public void AddMovingEntity(AnimatedEntity entity) { this.AnimatedEntities.Add(entity); }
public StartingCutscene(WorldBase returnTo) : base("Content\\Cutscene\\StartingCutscene\\cutsceneWorld", returnTo) { decorator.ambientSoundManager.requestMusicStop(); cutsceneDuration = 1200; cameraCommands.Add(new MovementCommand(new Vector2(1, -40), new Vector2(1, -40), 150)); //pause on the scene to let the player process it cameraCommands.Add(new MovementCommand(new Vector2(1, -40), new Vector2(-300, -40), 150)); //scroll over to the monsters cameraCommands.Add(new MovementCommand(new Vector2(-300, -40), new Vector2(-300, -40), 75)); //pause on the monsters cameraCommands.Add(new MovementCommand(new Vector2(-300, -40), new Vector2(1000, -40), 600)); //scroll to the right as the monsters chase the kids animatedPlayer = new AnimatedEntity(); AnimatedEntity animatedMonster1 = new AnimatedEntity(); AnimatedEntity animatedMonster2 = new AnimatedEntity(); AnimatedEntity animatedFather = new AnimatedEntity(); AnimatedEntity animatedMother = new AnimatedEntity(); animatedSister = new AnimatedEntity(); animatedEntities.Add(animatedPlayer); animatedEntities.Add(animatedMonster1); animatedEntities.Add(animatedMonster2); animatedEntities.Add(animatedFather); animatedEntities.Add(animatedMother); animatedEntities.Add(animatedSister); SoundEffect music = content.Load <SoundEffect>("Sounds/Music/intro_0"); musicInstance = music.CreateInstance(); musicInstance.Volume = MetaData.audioSettingMusic; animatedPlayer.animations.Add(new Animation(500, 500, new Texture2D[] { Game1.player_default_animations.standTex }, true)); animatedPlayer.animations[0].drawFlipped = false; animatedPlayer.movement.Add(new MovementCommand(new Vector2(100, 27), new Vector2(100, 27), 500)); animatedPlayer.animations.Add(new Animation(7 * 7, 400, Game1.player_default_animations.runTex, true)); animatedPlayer.animations[1].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(100, 27), new Vector2(900, 27), 400)); animatedSister.animations.Add(new Animation(500, 500, new Texture2D[] { Game1.player_girl_animations.standTex }, true)); animatedSister.animations[0].drawFlipped = false; animatedSister.movement.Add(new MovementCommand(new Vector2(150, 25), new Vector2(150, 25), 500)); animatedSister.animations.Add(new Animation(7 * 7, 250, Game1.player_girl_animations.runTex, true)); animatedSister.animations[1].drawFlipped = true; animatedSister.movement.Add(new MovementCommand(new Vector2(150, 25), new Vector2(675, 25), 250)); animatedMother.animations.Add(new Animation(40, 350, content.loadTextureRange("Cutscene/StartingCutscene/mother_stand_", 0), true)); animatedMother.movement.Add(new MovementCommand(new Vector2(180, 27), new Vector2(180, 27), 350)); animatedMother.animations.Add(new Animation(222, content.loadTextureRange("Cutscene/StartingCutscene/mother_block_", 2), false)); animatedMother.movement.Add(new MovementCommand(new Vector2(180, 27), new Vector2(180, 27), 222)); animatedMother.animations.Add(new Animation(20, content.loadTextureRange("Cutscene/StartingCutscene/mother_attack_", 0), false)); animatedMother.movement.Add(new MovementCommand(new Vector2(180, 27), new Vector2(175, 27), 20)); animatedMother.animations.Add(new Animation(20, content.loadTextureRange("Cutscene/StartingCutscene/mother_fall_", 4), false)); animatedMother.movement.Add(new MovementCommand(new Vector2(175, 27), new Vector2(185, 27), 20)); animatedMother.animations.Add(new Animation(1000, content.loadTextureRange("Cutscene/StartingCutscene/mother_fallen_", 0), false)); animatedMother.movement.Add(new MovementCommand(new Vector2(185, 27), new Vector2(185, 27), 1000)); animatedFather.animations.Add(new Animation(40, 350, content.loadTextureRange("Cutscene/StartingCutscene/father_guitar_", 4), true)); animatedFather.movement.Add(new MovementCommand(new Vector2(0, 27), new Vector2(0, 27), 600)); animatedFather.animations.Add(new Animation(50, content.loadTextureRange("Cutscene/StartingCutscene/father_stand_", 9), false)); animatedFather.movement.Add(new MovementCommand(new Vector2(0, 27), new Vector2(0, 27), 200)); animatedFather.animations.Add(new Animation(5 * 10, 1000, content.loadTextureRange("Cutscene/StartingCutscene/father_stab_", 8), true)); animatedFather.movement.Add(new MovementCommand(new Vector2(0, 27), new Vector2(0, 27), 1000)); entities.Add(new EntityFire(new Vector2(47, 47), this)); animatedMonster1.animations.Add(new Animation(21, 325, Game1.texture_entity_guardian_stand, true)); animatedMonster1.movement.Add(new MovementCommand(new Vector2(-300, 25), new Vector2(-300, 25), 325)); animatedMonster1.animations.Add(new Animation(7 * 5, 65, Game1.texture_entity_guardian_run, true)); animatedMonster1.movement.Add(new MovementCommand(new Vector2(-300, 25), new Vector2(-75, 25), 65)); animatedMonster1.animations.Add(new Animation(5 * 10, 1000, content.loadTextureRange("Cutscene/StartingCutscene/guardian_cower_", 8), true)); animatedMonster1.movement.Add(new MovementCommand(new Vector2(-75, 25), new Vector2(-75, 25), 1000)); animatedMonster2.animations.Add(new Animation(21, 325, Game1.texture_entity_guardian_stand, true)); animatedMonster2.movement.Add(new MovementCommand(new Vector2(-400, 25), new Vector2(-400, 25), 325)); animatedMonster2.animations.Add(new Animation(7 * 5, 600, Game1.texture_entity_guardian_run, true)); animatedMonster2.movement.Add(new MovementCommand(new Vector2(-400, 25), new Vector2(800, 25), 600)); animatedMonster2.animations.Add(new Animation(21, 50, Game1.texture_entity_guardian_stand, true));//the action is over. The monster pauses to catch its breath, then returns to fight the father. animatedMonster2.movement.Add(new MovementCommand(new Vector2(800, 25), new Vector2(800, 25), 50)); Animation returnAnim = new Animation(7 * 5, 600, Game1.texture_entity_guardian_run, true); returnAnim.drawFlipped = true; animatedMonster2.animations.Add(returnAnim); animatedMonster2.movement.Add(new MovementCommand(new Vector2(800, 25), new Vector2(-400, 25), 600)); }
private static void LoadAnimationContent() { //string delimit = "Yellow"; CONTENT_MANAGER.animationEntities = new Dictionary <SpriteSheetUnit, AnimatedEntity>(); CONTENT_MANAGER.animationSheets = new Dictionary <SpriteSheetUnit, Texture2D>(); CONTENT_MANAGER.animationTypes = new List <Animation>(); //list of unit type var UnitTypes = new List <SpriteSheetUnit>((IEnumerable <SpriteSheetUnit>)Enum.GetValues(typeof(SpriteSheetUnit))); //Artillery //load animation sprite sheet for each unit type foreach (SpriteSheetUnit unittype in UnitTypes) { var paths = unittype.ToString().Split('_'); //if (paths[0].CompareTo(delimit) == 0) { // break; } CONTENT_MANAGER.animationSheets.Add(unittype, CONTENT_MANAGER.Content.Load <Texture2D>("sprite//Animation//" + paths[0] + "//" + paths[1])); } //declare animation frame //animation frame for "normal" unit Animation idle = new Animation("idle", true, 4, string.Empty); for (int i = 0; i < 4; i++) { idle.AddKeyFrame(i * 48, 0, 48, 48); } Animation right = new Animation("right", true, 4, string.Empty); for (int i = 0; i < 4; i++) { right.AddKeyFrame(i * 48, 48, 48, 48); } Animation up = new Animation("up", true, 4, string.Empty); for (int i = 0; i < 4; i++) { up.AddKeyFrame(i * 48, 96, 48, 48); } Animation down = new Animation("down", true, 4, string.Empty); for (int i = 0; i < 4; i++) { down.AddKeyFrame(i * 48, 144, 48, 48); } Animation done = new Animation("done", true, 1, string.Empty); done.AddKeyFrame(0, 192, 48, 48); //animation frame for "HIGH" unit Animation idleAir = new Animation("idle", true, 4, string.Empty); for (int i = 0; i < 4; i++) { idleAir.AddKeyFrame(i * 64, 0, 64, 64); } Animation rightAir = new Animation("right", true, 4, string.Empty); for (int i = 0; i < 4; i++) { rightAir.AddKeyFrame(i * 64, 64, 64, 64); } Animation upAir = new Animation("up", true, 4, string.Empty); for (int i = 0; i < 4; i++) { upAir.AddKeyFrame(i * 64, 128, 64, 64); } Animation downAir = new Animation("down", true, 4, string.Empty); for (int i = 0; i < 4; i++) { downAir.AddKeyFrame(i * 64, 192, 64, 64); } Animation doneAir = new Animation("done", true, 1, string.Empty); doneAir.AddKeyFrame(0, 256, 64, 64); //animation frame for copter unit Animation idleCopter = new Animation("idle", true, 3, string.Empty); for (int i = 0; i < 3; i++) { idleCopter.AddKeyFrame(i * 64, 0, 64, 64); } CONTENT_MANAGER.animationTypes.Add(idle); CONTENT_MANAGER.animationTypes.Add(right); CONTENT_MANAGER.animationTypes.Add(up); CONTENT_MANAGER.animationTypes.Add(down); CONTENT_MANAGER.animationTypes.Add(done); foreach (SpriteSheetUnit unittype in UnitTypes) { string unittypestring = unittype.ToString(); AnimatedEntity temp = new AnimatedEntity(Vector2.Zero, Vector2.Zero, Color.White, LayerDepth.Unit); //if (unittypestring.Contains(delimit)) { //break; } temp.LoadContent(CONTENT_MANAGER.animationSheets[unittype]); if (unittypestring.Contains("TransportCopter") || unittypestring.Contains("BattleCopter") || unittypestring.Contains("Fighter") || unittypestring.Contains("Bomber")) { //we enter "HIGH" mode //first we set the origin to "HIGH" //because we are drawing from topleft and the sprite size is 64x64 temp.Origin = new Vector2(8, 16); //then we load the "HIGH" animation in if (unittypestring.Contains("Copter")) { temp.AddAnimation(idleCopter, rightAir, upAir, downAir, doneAir); } else { temp.AddAnimation(idleAir, rightAir, upAir, downAir, doneAir); } } else { //we enter "normal" mode temp.AddAnimation(idle, right, up, down, done); } temp.PlayAnimation("idle"); CONTENT_MANAGER.animationEntities.Add(unittype, temp); } }
public FindGirlCutscene(WorldBase returnTo) : base("Content\\Cutscene\\FindGirlCutscene\\cutsceneFindSisterWorld", returnTo) { decorator.ambientSoundManager.requestMusicStop(); SoundEffect music = content.Load <SoundEffect>("Sounds/Music/boy_finds_sister_0"); musicInstance = music.CreateInstance(); musicInstance.Volume = MetaData.audioSettingMusic; //set up the next world EntityGirl girl = new EntityGirl(new Vector2(100, ((World)returnTo).noise.octavePerlin1D(100) * returnTo.decorator.getTerrainMultiplier() * Chunk.tileDrawWidth), returnTo); girl.touchedPlayer = true; returnTo.addEntity(girl); cutsceneDuration = 800; cameraCommands.Add(new MovementCommand(new Vector2(200, 0), new Vector2(200, 0), 650));//pause on the scene to let the player process it animatedPlayer = new AnimatedEntity(); animatedSister = new AnimatedEntity(); animatedEntities.Add(animatedPlayer); animatedEntities.Add(animatedSister); animatedPlayer.animations.Add(new Animation(150, 150, new Texture2D[] { Game1.player_default_animations.standTex }, true)); animatedPlayer.animations[0].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(0, 27), new Vector2(0, 27), 150)); animatedPlayer.animations.Add(new Animation(7 * 7, 100, Game1.player_default_animations.runTex, true)); animatedPlayer.animations[1].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(0, 27), new Vector2(140, 27), 100)); animatedPlayer.animations.Add(new Animation(75, content.loadTextureRange("Cutscene/FindGirlCutscene/player_hug_", 3), false)); animatedPlayer.animations[2].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(140, 27), new Vector2(140, 27), 75)); animatedPlayer.animations.Add(new Animation(100, new Texture2D[] { content.Load <Texture2D>("Cutscene/FindGirlCutscene/player_hug_3") }, false)); animatedPlayer.animations[3].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(140, 27), new Vector2(140, 27), 100)); animatedPlayer.animations.Add(new Animation(7 * 7, 150, Game1.player_default_animations.runTex, true)); animatedPlayer.animations[4].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(140, 27), new Vector2(475, 27), 150)); animatedSister.animations.Add(new Animation(150, 150, new Texture2D[] { Game1.player_girl_animations.standTex }, true)); animatedSister.animations[0].drawFlipped = false; animatedSister.movement.Add(new MovementCommand(new Vector2(300, 25), new Vector2(300, 25), 150)); animatedSister.animations.Add(new Animation(7 * 7, 100, Game1.player_girl_animations.runTex, true)); animatedSister.animations[1].drawFlipped = false; animatedSister.movement.Add(new MovementCommand(new Vector2(300, 25), new Vector2(160, 25), 100)); animatedSister.animations.Add(new Animation(75, content.loadTextureRange("Cutscene/FindGirlCutscene/girl_hug_", 3), false)); animatedSister.animations[2].drawFlipped = false; animatedSister.movement.Add(new MovementCommand(new Vector2(160, 25), new Vector2(160, 25), 75)); animatedSister.animations.Add(new Animation(100, new Texture2D[] { content.Load <Texture2D>("Cutscene/FindGirlCutscene/girl_hug_3") }, false)); animatedSister.animations[3].drawFlipped = false; animatedSister.movement.Add(new MovementCommand(new Vector2(160, 25), new Vector2(160, 25), 100)); animatedSister.animations.Add(new Animation(7 * 7, 200, Game1.player_girl_animations.runTex, true)); animatedSister.animations[4].drawFlipped = true; animatedSister.movement.Add(new MovementCommand(new Vector2(160, 25), new Vector2(475, 25), 200)); for (int i = 0; i < 300; i++) { ParticleArbitrary particle = new ParticleArbitrary(new Vector2(-10 + rand.Next(20), 50 - rand.Next(40)), this, new Vector2((float)rand.NextDouble(), 0), 300, Game1.texture_particle_blood); particle.width = 4; particle.height = 4; particle.gravityMultiplier = (float)rand.NextDouble() * -.4f; particle.startColor = groundColor; particle.endColor = groundColor; this.addEntity(particle); } }