Exemplo n.º 1
0
    public override void initialize(World world, int id)
    {
        base.initialize(world, id);

        this.timeRemaining = Random.Range(this.burnTimeRange.x, this.burnTimeRange.y);

        this.StartCoroutine(EntityFire.fireSpread(this.world, this.position, this.fireSpreadRange));
    }
Exemplo n.º 2
0
        public override int use(PlayerBase user, WorldBase world, Vector2 location, GameTime time, BinaryInputManager inputManager)
        {
            base.use(user, world, location, time, inputManager);

            Point   selPoint = world.worldLocToTileLoc(location);
            Vector2 fireLoc  = new Vector2(selPoint.X * Chunk.tileDrawWidth + Chunk.tileDrawWidth / 2, selPoint.Y * Chunk.tileDrawWidth + Chunk.tileDrawWidth / 2);

            EntityFire fire = new EntityFire(fireLoc, world);

            world.addEntity(fire);

            return(1);
        }
Exemplo n.º 3
0
    /// <summary>
    /// awake call at start, just taking the entity that will fire
    /// </summary>
    protected override void CustomAwake()
    {
        base.CustomAwake();

        _entityFire = GetComponentInParent <EntityFire>();
    }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 5
0
    public override void onCreate(World world, CellState state, Position pos)
    {
        base.onCreate(world, state, pos);

        this.StartCoroutine(EntityFire.fireSpread(this.world, this.pos, this._fireSpreadRate));
    }