Ejemplo n.º 1
0
    public InGamePage()
    {
        FSprite bg = new FSprite("Atlases/bg");
        bg.width = Futile.screen.width;
        bg.height = Futile.screen.height;
        AddChild(bg);
        hudStuff = new FLabel("Minecraftia", "Energy:");
        hudShadow = new FLabel("Minecraftia", "Energy:");
        hudStuff.scale = 0.7f;
        hudShadow.scale = 0.7f;
        hudShadow.color = Color.black;
        hudStuff.SetPosition(new Vector2(0  , (Futile.screen.height/2)*0.9f));
        hudShadow.SetPosition(new Vector2( 1f, ((Futile.screen.height / 2) * 0.9f - 1)));

        gameArea = new FContainer();
        enemies = new List<Entity>();
        projectiles = new List<Entity>();
        Enemyprojectiles = new List<Entity>();
        entityContainer = new FContainer();
        projectileContainer = new FContainer();
        particleContainer = new FContainer();
        gameArea.AddChild(particleContainer);
        particleContainer.AddChild(projectilesParticles = new FParticleSystem(300));

        gameArea.AddChild(entityContainer);
        gameArea.AddChild(projectileContainer);
        AddChild(gameArea);
        InGamePage.CurrentInGamePage = this;
        ListenForUpdate(Update);
        jugador = new Player();
        GenerateFoe();

        AddChild(hudShadow);
        AddChild(hudStuff);
    }
Ejemplo n.º 2
0
    override public void Start()
    {
        root         = FPWorld.Create(64.0f);
        screenCenter = new Vector2(Futile.screen.halfWidth, Futile.screen.halfHeight);
        ListenForUpdate(Update);
        _gameObjects = new FContainer();
        AddChild(_gameObjects);
        _enemyContainer = new FContainer();
        AddChild(_enemyContainer);
        AddChild(impactParticles      = new FParticleSystem(40));
        AddChild(projectilesParticles = new FParticleSystem(300));
        _playerBullets = new FContainer();
        AddChild(_playerBullets);

        t = Time.time;

        CreateWorld();
        InitPlayer();
        scoreLabel = new FLabel("font", "Score = " + Score);
        gameOver   = new FLabel("font", "Game Over, press 'R' to try again!");
        scoreLabel.SetAnchor(new Vector2(0, -10));
        AddChild(scoreLabel);

        FSoundManager.PlayMusic("Barymag");
        FSoundManager.isMuted = false;
    }
Ejemplo n.º 3
0
    public override void Start()
    {
        root = FPWorld.Create(64.0f);
        screenCenter=new Vector2(Futile.screen.halfWidth,Futile.screen.halfHeight);
        ListenForUpdate(Update);
        _gameObjects = new FContainer();
        AddChild(_gameObjects);
        _enemyContainer = new FContainer();
        AddChild(_enemyContainer);
        AddChild(impactParticles = new FParticleSystem(40));
        AddChild(projectilesParticles = new FParticleSystem(300));
        _playerBullets = new FContainer();
        AddChild(_playerBullets);

        t = Time.time;

        CreateWorld();
        InitPlayer();
        scoreLabel = new FLabel("font", "Score = "+ Score);
        gameOver = new FLabel("font", "Game Over, press 'R' to try again!");
        scoreLabel.SetAnchor(new Vector2(0,-10));
        AddChild(scoreLabel);

        FSoundManager.PlayMusic("Barymag");
        FSoundManager.isMuted=false;
    }
Ejemplo n.º 4
0
        public EffectManager(bool hasParticles)
        {
            this.hasParticles = hasParticles;

            AddChild (flyCoinContainer = new FContainer ());

            if (hasParticles) {
                AddChild (particleSystem = new FParticleSystem (60));
                particleSystem.shader = FShader.Additive;
            }
        }
Ejemplo n.º 5
0
    public EffectManager(bool hasParticles)
    {
        this.hasParticles = hasParticles;

        AddChild(flyCoinContainer = new FContainer());

        if (hasParticles)
        {
            AddChild(particleSystem = new FParticleSystem(60));
            particleSystem.shader   = FShader.Additive;
        }
    }
Ejemplo n.º 6
0
    public Background()
    {
        AddChild(sprite = new FSprite("background"));

        sprite.scale = 1.3333f;

        AddChild(lavaParticles = new FParticleSystem(100));
        lavaParticles.shader = FShader.Additive;

        InitLava ();

        ListenForUpdate (HandleUpdate);
    }
Ejemplo n.º 7
0
    public World()
    {
        instance = this;

        isGameOver = false;

        root = FPWorld.Create(64.0f);

        AddChild(backParticles = new FParticleSystem(150));

        AddChild(chainHolder = new FContainer());
        AddChild(beastShadowHolder = new FContainer());
        AddChild(beastHolder = new FContainer());
        AddChild(effectHolder = new FContainer());

        AddChild(glowParticles = new FParticleSystem(150));
        glowParticles.shader = FShader.Additive;

        AddChild(orbHolder = new FContainer());

        uiStage = new FStage("UIStage");
        Futile.AddStage(uiStage);

        uiStage.scale = Futile.stage.scale;

        uiStage.AddChild(uiHolder = new FContainer());

        teams = GameManager.instance.activeTeams;

        InitBeasts();

        InitOrbs();

        InitUI();

        spawnRateMultiplier = 1.0f;

        walls = new Walls(this);

        ListenForUpdate(HandleUpdate);

        Input.ResetInputAxes();
    }
Ejemplo n.º 8
0
    public InGamePage()
    {
        FSprite bg = new FSprite("Atlases/bg");

        bg.width  = Futile.screen.width;
        bg.height = Futile.screen.height;
        AddChild(bg);
        hudStuff        = new FLabel("Minecraftia", "Energy:");
        hudShadow       = new FLabel("Minecraftia", "Energy:");
        hudStuff.scale  = 0.7f;
        hudShadow.scale = 0.7f;
        hudShadow.color = Color.black;
        hudStuff.SetPosition(new Vector2(0, (Futile.screen.height / 2) * 0.9f));
        hudShadow.SetPosition(new Vector2(1f, ((Futile.screen.height / 2) * 0.9f - 1)));


        gameArea            = new FContainer();
        enemies             = new List <Entity>();
        projectiles         = new List <Entity>();
        Enemyprojectiles    = new List <Entity>();
        entityContainer     = new FContainer();
        projectileContainer = new FContainer();
        particleContainer   = new FContainer();
        gameArea.AddChild(particleContainer);
        particleContainer.AddChild(projectilesParticles = new FParticleSystem(300));

        gameArea.AddChild(entityContainer);
        gameArea.AddChild(projectileContainer);
        AddChild(gameArea);
        InGamePage.CurrentInGamePage = this;
        ListenForUpdate(Update);
        jugador = new Player();
        GenerateFoe();

        AddChild(hudShadow);
        AddChild(hudStuff);
    }
Ejemplo n.º 9
0
    void loadTiles()
    {
        foreach (PlatformData platform in levelData.getPlatformData())
        {
            FSprite plat = new FSprite(platform.image);
            plat.height = 16;
            plat.width = 16;
            tileSize = plat.width;
            Tiles[(int)platform.x, (int)platform.y] = 1;
            // make them overlap a little to avoid those ungly lines in the rendering.
            plat.SetPosition(new Vector2((platform.x * plat.width), (-platform.y * plat.height)));

            AddChild(plat);
        }
        playerBullets = new List<Bullet>();
        hazards = new List<Hazard>();
        particleContainer = new FContainer();
        AddChild(particleContainer);
        enemyContainer = new FContainer();
        AddChild(enemyContainer);
        particles = new FParticleSystem(50);
        particleContainer.AddChild(particles);
        projectileContainer = new FContainer();
        AddChild(projectileContainer);
        entityContainer = new FContainer();
        AddChild(entityContainer);
        frontContainer = new FContainer();
        AddChild(frontContainer);
        this.alpha = 0;

        TweenConfig tw = new TweenConfig();
        tw.floatProp("alpha", 1);
        Go.to(this, 10f, tw);

        stats = new FLabel("font", "Jump Packs: 0; reload times: 0");
        CurrentPage.GetHUD().AddChild(stats);
        stats.scale = 0.9f;
        stats.SetPosition(new Vector2(Futile.screen.halfWidth, Futile.screen.height * 0.9f));
    }