Exemplo n.º 1
0
 public Armor(int iconID, int price, float weight, int durability, ArmorType armorType, Player.Stats changeStats)
     : base(iconID, null, price, weight, false)
 {
     this.durability  = durability;
     this.armorType   = armorType;
     this.changeStats = changeStats;
 }
Exemplo n.º 2
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        int jumpAmount = 1;

        stats.jumpAmount += jumpAmount;

        //Die();
    }
Exemplo n.º 3
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        float percentIncrease = 2;

        for (int i = 0; i < stats.attack.Length; i++)
        {
            stats.attack[i] *= percentIncrease;
        }
    }
Exemplo n.º 4
0
Arquivo: Speed.cs Projeto: AJ213/Awitu
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        int   capIncrease = 45;
        float smoothness  = 0.1f;
        int   baseSpeed   = 15;
        float calculation = capIncrease - (capIncrease / (smoothness * count + 1));

        stats.speed = calculation + baseSpeed;
    }
Exemplo n.º 5
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        int   capIncrease    = 22;
        float smoothness     = 0.1f;
        int   baseJumpHeight = 5;
        float calculation    = capIncrease - (capIncrease / (smoothness * count + 1)) + baseJumpHeight;

        stats.jumpHeight = calculation;
    }
Exemplo n.º 6
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        if (count == 1)
        {
            stats.health.Armor = 6;
            return;
        }
        float armorIncrease = 1.6f;

        stats.health.Armor *= armorIncrease;
    }
Exemplo n.º 7
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        int   capIncrease = 500;
        float smoothness  = 0.03f;
        int   baseSpeed   = 20;
        int   baseSize    = 5;

        float speedCalculation = capIncrease - (capIncrease / (smoothness * count + 1)) + baseSpeed;
        float sizeCalculation  = capIncrease / 20 - (capIncrease / 20 / (smoothness * count + 1)) + baseSize;

        stats.flamethrowerSpeed = speedCalculation;
        stats.flamethrowerSize  = sizeCalculation;
    }
Exemplo n.º 8
0
    public void Initialize(Vector2 northPole)
    {
        Vector2 empty = new Vector2();

        foreach (KeyValuePair <Player.Stats, Color> kvPair in STAT_BAR_COLORS)
        {
            Player.Stats stat = kvPair.Key;
            statBars[stat] = new GUIVerticalBar(empty, BAR_LENGTH, kvPair.Value,
                                                () => player[stat],
                                                () => player[stat] < STAT_LEVEL_MAX_SHOW[stat]);
            AddChild(statBars[stat]);
            Sprite sprite = STAT_BAR_SPRITES[stat]();
            sprite.Scale    = ICON_SCALE;
            sprite.Position = ICON_OFFSET;
            statBars[stat].AddChild(sprite);
        }
        foreach (KeyValuePair <Gas, Color> kvPair in GAS_BAR_COLORS)
        {
            Gas g = kvPair.Key;
            gasBars[g] = new GUIHorizontalBar(empty, ATM_BAR_LENGTH, kvPair.Value,
                                              () => atm.GetGasProgress(g),
                                              () => atm.GetGasProgress(g) > 0 && atm.GetGasProgress(g) < 1);
            AddChild(gasBars[g]);
        }

        // debugSheet = new GUIBox(empty, COMPASS_SIZE);
        // AddChild(debugSheet);
        compass = new GUICompass(empty, COMPASS_SIZE, northPole,
                                 () => new Vector2(player.Translation.x, player.Translation.z) / Block.SIZE,
                                 viewDirSupplier,
                                 () => (player.Translation / Block.SIZE - northMonopole).LengthSquared() >= MIN_RADIUS_FOR_COMPASS * MIN_RADIUS_FOR_COMPASS);
        AddChild(compass);

        // hacky, works for now, TODO: fix
        inHandLabel = new GUILabel(() => {
            bool showLabel = !BackgroundMode && player.ItemInHand != null;
            if (showLabel)
            {
                inHandLabel.Text = "Currently in hand: " + player.ItemInHand.Item.Name + ",    Quantity : " + player.ItemInHand.Count;
            }
            return(showLabel);
        });
        AddChild(inHandLabel);

        Texture tex = Game.guiResourceLoader.GetResource(CROSSHAIR_TEX) as Texture;

        crosshair = new GUIObject(empty, tex.GetSize(), tex, () => !BackgroundMode);
        AddChild(crosshair);
        Visible = true;
    }
Exemplo n.º 9
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        float calculation = 1 - (1 / (0.15f * count + 1)) + 1;

        stats.health.PercentImmune = calculation;
    }
Exemplo n.º 10
0
 public ItemConsumable(ItemID id, String name, Texture tex, Player.Stats stat, float replenishValue) : base(id, name, tex, Item.ItemType.CONSUMABLE)
 {
     StatValueChange = replenishValue;
     StatToReplenish = stat;
 }
Exemplo n.º 11
0
 public Weapon(int iconID, int price, float weight, int durability, ArmorType armorType, Player.Stats changeStats)
     : base(iconID, price, weight, durability, armorType, changeStats)
 {
 }
Exemplo n.º 12
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        float percentIncrease = 1.6f;

        stats.attackSpeed *= percentIncrease;
    }
Exemplo n.º 13
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        float percentIncrease = 2;

        stats.mana.RegenAmount *= percentIncrease;
    }
Exemplo n.º 14
0
 public Sword(int iconID, int price, float weight, int durability, ArmorType armorType, float range, SoundEffect attackSound, SoundEffect swingSound, Player.Stats changeStats)
     : base(iconID, price, weight, durability, armorType, changeStats)
 {
     this.range       = range;
     this.attackSound = attackSound;
     this.swingSound  = swingSound;
 }
Exemplo n.º 15
0
 public Bow(int iconID, int price, float weight, int durability, ArmorType armorType, Projectile.ProjectileData projectileData, Player.Stats changeStats)
     : base(iconID, price, weight, durability, armorType, changeStats)
 {
     this.projectileData = projectileData;
 }
Exemplo n.º 16
0
    public void ChangeStat(ref Player.Stats stats, int count)
    {
        float percentIncrease = 2;

        stats.health.MaxStat *= percentIncrease;
    }