Esempio n. 1
0
    private StatsSet buildUpgradeStats(int price, float attackB, float rangeB, float speedB, float healthB)
    {
        StatsSet set = new StatsSet();

        set.set("price", price);
        set.set("attackBoost", attackB);
        set.set("speedBoost", speedB);
        set.set("rangeBoost", rangeB);
        set.set("healthBoost", healthB);

        return(set);
    }
Esempio n. 2
0
    public static GameTargetInstance instantiate()
    {
        int objectId = IDFactory.getNextID();

        if (_templateObject == null)
        {
            StatsSet set = new StatsSet();
            set.set("name", "Castillo");
            set.set("relativeModelPath", "Target_Castle/target_castle");
            set.set("health", 2500.0f);
            _templateObject = new GameTarget(set);
        }

        GameTargetInstance gti = new GameTargetInstance(objectId, _templateObject);

        World.getInstance().registerTarget(gti);

        return(gti);
    }
Esempio n. 3
0
    private EnemyTable()
    {
        _enemies = new Dictionary <string, GameEnemy> ();

        StatsSet spiderSet = new StatsSet();

        spiderSet.set("name", "Araña Exploradora");
        spiderSet.set("relativeModelPath", "Spider_Scout/spider_scout_walk");
        spiderSet.set("health", 350.0f);
        spiderSet.set("attackDamage", 50.0f);
        spiderSet.set("attackRange", 5.0f);
        spiderSet.set("attackFrequency", 1.0f);
        spiderSet.set("killReward", 15);
        spiderSet.set("animationController", "Spider_Scout/spider_scout_controller");
        registerEnemy(new GameEnemy(spiderSet));
    }
Esempio n. 4
0
    private void addGraphicsUpdate(StatsSet s, int index, Color c)
    {
        Dictionary <int, Color> graphics = s.getObject("graphicsUpgrade") as Dictionary <int, Color>;

        if (graphics == null)
        {
            graphics = new Dictionary <int, Color> ();
            graphics.Add(index, c);

            s.set("graphicsUpgrade", graphics);
        }
        else if (graphics.ContainsKey(index))
        {
            graphics [index] = c;
        }
        else
        {
            graphics.Add(index, c);
        }
    }
Esempio n. 5
0
    private TowerTable()
    {
        _towers = new Dictionary <string, GameTower> ();

        Ammunition cannonBall = new Ammunition("Cannon_Ball/cannon_ball", 50.0f);

        StatsSet cannon = new StatsSet();

        cannon.set("name", "Torre Cañón");
        cannon.set("relativeModelPath", "Tower_Cannon/cannon_tower");
        cannon.set("fracturedAssetPath", "Tower_Cannon/Fractured/cannon_tower_fractured");
        cannon.set("attackFrequency", 1.0f);
        cannon.set("attackDamage", 100.0f);
        cannon.set("attackRange", 15.0f);
        cannon.set("health", 500.0f);
        cannon.set("ammunition", cannonBall);
        cannon.set("coinPrice", 100);
        cannon.set("attackParticleSystem", "PS_CannonBurst");
        cannon.set("attackSound", "sound_cannon");
        cannon.set("towerIcon", "Icons/Tower_Thumbnails/cannon_tower");
        cannon.set("repairCostPerPS", 0.1f);
        registerTower(new GameTower(cannon));
    }
Esempio n. 6
0
 private void setAmmunition(StatsSet set, Ammunition a)
 {
     set.set("ammunition", a);
 }