public LootMemory cpy()
    {
        LootMemory		result = new LootMemory();
        result.sprite = this.sprite;
        result.weapon = this.weapon;
        result.subname = this.subname;
        result.damage = this.damage;
        result.speed = this.speed;
        result.rank = this.rank;

        return result;
    }
Exemple #2
0
    public static LootMemory toMemory(Loot cpy)
    {
        LootMemory result = new LootMemory();

        result.damage = cpy.damage;
        result.speed = cpy.speed;
        result.rank = cpy.rank;
        result.weapon = cpy.weapon;
        result.sprite = cpy.sprite;
        result.subname = cpy.subname;

        return (result);
    }
Exemple #3
0
    public LootMemory equipWeapon(LootMemory loot)
    {
        LootMemory oldWeaponMemory = weaponMemory;

        foreach (Weapon w in weapons)
            Destroy(w.gameObject);

        weapons[0] = GameObject.Instantiate(loot.weapon);
        weapons[0].damage = loot.damage;
        weapons[0].transform.SetParent(this.hand.transform.parent);
        weapons[0].transform.localPosition = loot.weapon.transform.position;
        weapons[0].transform.localScale = loot.weapon.transform.localScale;
        weapons[0].transform.localRotation = loot.weapon.transform.rotation;
        imgWeapon.texture = loot.getSprite();
        weaponMemory = loot.cpy();

        return (oldWeaponMemory);
    }