예제 #1
0
 public void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.itemName = itemNames[Random.Range(0, 5)];
     newEquipment.ItemId   = Random.Range(0, 101);
     ChooseItemType();
 }
        public void EntrySyntheticPathPanel()
        {
            EquipmentUIResourceManage.Instance.SyntheticPathPanel.SetActive(true);
            BaseEquipment ba = EquipmentFactory.Instance.GetEquipmemtByID(EquipmentButton.currentEquipmentButton.GetComponent <EquipmentButton>().equipemntId);

            EquipmentUIResourceManage.Instance.SyntheticPathPanel.SendMessage("ReciveMessageUp", ba);
        }
    //TODO Create array of strings to be used for weapon info
    //TODO Read a JSON or XML File of weapons
    //private string[] equipment = new String[x]; //Test code for creating the array

    private void CreateEquipment()
    {
        newEquipment = new BaseEquipment();

        //Name
        newEquipment.ItemName = "TestName";
        //newEquipment.ItemName = equipment[x]

        //Description
        newEquipment.ItemDescription = "This is a desc for equipment";

        //ItemID
        newEquipment.ItemID = Random.Range(101, 201);

        //Stats
        //For now they will be hardcoded but plan to add them to the itemfile that is read
        newEquipment.Defence = 0;
        newEquipment.Speed   = 0;
        newEquipment.Luck    = 0;

        //Spell Effect - Not sure if this will be used later on
        newEquipment.SpellEffectID = Random.Range(1, 20);

        //Equipment Type
        ChooseEquipmentType();

        //ItemType
        newEquipment.ItemType = BaseItem.ItemTypes.EQUIPMENT;
    }
        void SetAnimation(BaseEquipment equipment)
        {
            var      movementAnimationHandler = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <MovementAnimationHandler>();
            Animator animator = null;

            switch (equipment.EquipmentType)
            {
            case EquipmentType.Chest:
                break;

            case EquipmentType.Legs:
                animator = movementAnimationHandler.LegsSlot.GetComponentInChildren <Animator>();
                animator.runtimeAnimatorController =
                    equipment.ItemPrefab.GetComponent <EquippableItemBehaviour>().AnimatorController;
                break;

            case EquipmentType.Boots:
                break;

            case EquipmentType.RightHand:
                break;

            case EquipmentType.LeftHand:
                break;
            }
        }
예제 #5
0
        /// <summary>
        /// 实例化合成面板的选择面板内容
        /// </summary>
        /// <param name="baseEquiment"></param>
        private void InstanceTableList(BaseEquipment baseEquiment)
        {
            int length = baseEquiment.parientEquipentList.Count;

            if (length > 0)
            {
                float buttonWidth = tableObjectHeight;
                float width       = buttonWidth * length + 2 * (length + 1);
                // Debug.Log(width);
                if (width < tableObjectWidth)
                {
                    width = tableObjectWidth;
                }
                //Debug.Log(width);
                contentTableObject.GetComponent <RectTransform>().sizeDelta = new Vector2(width, 0);
                int count = 0;
                foreach (int a in baseEquiment.parientEquipentList)
                {
                    BaseEquipment equipemnt = EquipmentFactory.Instance.GetEquipmemtByID(a);
                    if (equipemnt != null)
                    {
                        GameObject           ga     = Instantiate(InstanceTableObject) as GameObject;
                        SyntheyicTableButton button = ga.GetComponent <SyntheyicTableButton>();
                        ga.GetComponent <Image>().sprite = equipemnt.equipmentIcor;
                        button.equipmentId  = equipemnt.equipmentId;
                        button.equipemtType = equipemnt.equipmentType;

                        ga.transform.SetParent(contentTableObject.transform);
                        ga.GetComponent <RectTransform>().sizeDelta     = new Vector2(buttonWidth, 0);
                        ga.GetComponent <RectTransform>().localPosition = new Vector2(count * (buttonWidth + 2) + 2 + buttonWidth / 2, -buttonWidth / 2);
                        count++;
                    }
                }
            }
        }
예제 #6
0
 public Equipment(BaseEquipment baseEquipment, Rarity rarity, DamageSetConfig rolledMod, int damage, bool hasQuality)
 {
     this.Base       = baseEquipment;
     this.rarity     = rarity;
     this.RolledMod  = rolledMod;
     this.Damage     = damage;
     this.HasQuality = hasQuality;
 }
예제 #7
0
 // creates a random equipment
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 3)] + " item yo.";
     newEquipment.ItemID   = Random.Range(1, 101);
     newEquipment.ItemType = BaseItem.ItemTypes.EQUIPMENT;
     ChooseEquipmentType();
 }
예제 #8
0
 // creates a random equipment
 private void CreateEquipment()
 {
     newEquipment = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0,3)] + " item yo.";
     newEquipment.ItemID = Random.Range(1,101);
     newEquipment.ItemType = BaseItem.ItemTypes.EQUIPMENT;
     ChooseEquipmentType();
 }
	private void CreateEquipment(){
		newEquipment = new BaseEquipment ();
		newEquipment.ItemName = itemNames[Random.Range(0,4)];
		newEquipment.ItemID = Random.Range (1, 101);
		ChooseItemType ();
		newEquipment.ItemDescription = itemDes [Random.Range (0, 2)];
		newEquipment.Endurance = Random.Range (1, 11);
		newEquipment.Intellect = Random.Range (1, 11);
		newEquipment.Strenght = Random.Range (1, 11);
	}
 private void button4_Click(object sender, EventArgs e)
 {
     if (!textBox1.Text.Equals(""))
     {
         BaseEquipment be = new BaseEquipment(true);
         be.itemName = textBox1.Text;
         MapBuilder.gcDB.gameItems.Add(be);
         reloadLB1();
     }
 }
예제 #11
0
    private static Equipment FromSave(SavedEquipment saved)
    {
        BaseEquipment   baseEquipment = Data.BaseEquipments.Get(saved.BaseReference);
        DamageSetConfig rolledMod     = null;

        if (!string.IsNullOrEmpty(saved.RolledModReference))
        {
            rolledMod = Data.DamageSets.Get(saved.RolledModReference);
        }
        return(new Equipment(baseEquipment, saved.Rarity, rolledMod, saved.Damage, saved.HasQuality));
    }
예제 #12
0
    private void CreateEquipment()
    {
        newEquipment = new BaseEquipment();

        string tempName = UppercaseFirst(newEquipment.EquipmentType.ToString());

        newEquipment.ItemName        = equipmentNames[Random.Range(0, equipmentNames.Length)] + " " + tempName + " Armor";
        newEquipment.ItemDescription = "This is a " + newEquipment.ItemName;
        newEquipment.ItemID          = Random.Range(1, 101);
        newEquipment.Defense         = Random.Range(1, 11);
    }
예제 #13
0
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 4)];
     newEquipment.ItemID   = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.ItemDescription = itemDes [Random.Range(0, 2)];
     newEquipment.Endurance       = Random.Range(1, 11);
     newEquipment.Intellect       = Random.Range(1, 11);
     newEquipment.Strenght        = Random.Range(1, 11);
 }
예제 #14
0
	private void CreateEquipment() {
		newEquipment = new BaseEquipment();
		newEquipment.ItemName = itemNames [Random.Range(0, itemNames.Length)] + " Item";
		newEquipment.ItemID = Random.Range(1, 101);
		ChooseItemType();
		newEquipment.ItemDsecription = itemDes [Random.Range(0, itemDes.Length)];
		newEquipment.Endurance = Random.Range(1, 11);
		newEquipment.Stamina = Random.Range(1, 11);
		newEquipment.Strength = Random.Range(1, 11);
		newEquipment.Intellect = Random.Range(1, 11);
	}
예제 #15
0
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 3)] + " Item";
     newEquipment.ItemID   = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.ItemDescription = itemDes[Random.Range(0, itemDes.Length)];
     newEquipment.Strength        = Random.Range(1, 101);
     newEquipment.Dexterity       = Random.Range(1, 101);
     newEquipment.Intelligence    = Random.Range(1, 101);
 }
예제 #16
0
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 6)] + " item";
     newEquipment.ItemID   = Random.Range(1, 1000);
     ChooseItemType();
     newEquipment.ItemDescription = itemDes(Random.Range(0, item.Length));
     newEquipment.Stamina         = Random.Range(1, 15);
     newEquipment.Dexterity       = Random.Range(1, 15);
     newEquipment.Strength        = Random.Range(1, 15);
     newEquipment.Intellect       = Random.Range(1, 15);
 }
예제 #17
0
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 3)] + " Item";
     newEquipment.ItemID   = Random.Range(1, 101);
     ChooseItemtype();
     newEquipment.ItemDescription = itemDes[Random.Range(0, itemDes.Length)];
     newEquipment.Stamina         = Random.Range(1, 11);
     newEquipment.Endurance       = Random.Range(1, 11);
     newEquipment.Intellect       = Random.Range(1, 11);
     newEquipment.Strength        = Random.Range(1, 11);
 }
예제 #18
0
 private void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = "E" + Random.Range(1, 101);
     newEquipment.ItemID   = Random.Range(1, 10);
     ChooseItemType();
     newEquipment.ItemDescription = "This is a" + newEquipment.EquipmentType;
     newEquipment.Stamina         = Random.Range(1, 11);
     newEquipment.Endurance       = Random.Range(1, 11);
     newEquipment.Intellect       = Random.Range(1, 11);
     newEquipment.Strenght        = Random.Range(1, 11);
 }
예제 #19
0
    private void CreateEquipment()
    {
        newEquipment = new BaseEquipment ();
        newEquipment.itemName = itemNames[Random.Range (1, itemNames.Length)];
        newEquipment.itemID = Random.Range (1, 101);
        newEquipment.itemDescription = itemDes[Random.Range (1, itemDes.Length)];
        ChooseItemType ();

        newEquipment.stamina = Random.Range (1, 11);
        newEquipment.endurance = Random.Range (1, 11);
        newEquipment.strength = Random.Range (1, 11);
        newEquipment.intellect = Random.Range (1, 11);
    }
예제 #20
0
 private void CreateEquipment()
 {
     newEquipment                 = new BaseEquipment();
     newEquipment.ItemName        = itemNames [randItem] + " Item";
     newEquipment.ItemDescription = itemDescription [randItem] + " Item";
     newEquipment.ItemID          = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.Strength     = Random.Range(1, 21);
     newEquipment.Intelligence = Random.Range(1, 21);
     newEquipment.Speed        = Random.Range(1, 21);
     newEquipment.Agility      = Random.Range(1, 21);
     newEquipment.Endurance    = Random.Range(1, 21);
     newEquipment.Luck         = Random.Range(1, 21);
 }
예제 #21
0
 private void CreateEquipment()
 {
     newEquipment = new BaseEquipment();
     //randomly choose index value for equipment name
     newEquipment.ItemName = itemNames[Random.Range(0, 6)] + " Item";
     newEquipment.ItemID   = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.ItemDescription = itemDescription[Random.Range(0, itemDescription.Length)];
     newEquipment.Stamina         = Random.Range(1, 11);
     newEquipment.Strength        = Random.Range(1, 11);
     newEquipment.Dexterity       = Random.Range(1, 11);
     newEquipment.Intellect       = Random.Range(1, 11);
     newEquipment.Endurance       = Random.Range(1, 11);
 }
예제 #22
0
    private void CreateEquipment()
    {
        newEquipment          = new BaseEquipment();
        newEquipment.ItemName = itemNames [Random.Range(0, 3)] + " Item";
        newEquipment.ItemID   = Random.Range(1, 101);

        newEquipment.ItemDescription = "This is a new piece of equipment.";
        newEquipment.Strength        = Random.Range(1, 10);
        newEquipment.Intelligence    = Random.Range(1, 10);
        newEquipment.Faith           = Random.Range(1, 10);
        newEquipment.Agility         = Random.Range(1, 10);

        ChooseItemType();
    }
예제 #23
0
    public void RefreshEquipment(GameObject slot, BaseEquipment equipment)
    {
        slot.transform.DestroyChildren();

        if (equipment == null)
        {
            return;
        }

        SpriteManager sprites = GameManager.instance.SpriteManager;

        SpriteManager.CreateImage(slot.transform, sprites.GetSprite(equipment.ID));
        SpriteManager.CreateText(slot.transform, 16, new Vector3(40, -40, 0), true).text = equipment.GetValue().ToString();
    }
예제 #24
0
 public BaseEquipment CreateEquipment()
 {
     newEquipment = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range (0,3)] + " Item";
     newEquipment.ItemID = Random.Range(1,101);
     ChooseItemType();
     newEquipment.Stamina = Random.Range (1,20);
     newEquipment.Strength = Random.Range (1,20);
     newEquipment.Dexterity = Random.Range (1,20);
     newEquipment.Intellect = Random.Range (1,20);
     newEquipment.Health = Random.Range (1,20);
     newEquipment.Mana = Random.Range (1,20);
     newEquipment.SpellEffectID = Random.Range (1,20);
     return newEquipment;
 }
예제 #25
0
 private void CreateEquipment()
 {
     newEquipment = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0,4)] + " item";
     newEquipment.ItemID = Random.Range(1,101);
     ChooseItemType();
     newEquipment.ItemDescription = itemDescription[Random.Range(0,itemDescription.Length)];
     newEquipment.Strength = Random.Range(1,10);
     newEquipment.Stamina = Random.Range(1,10);
     newEquipment.Dexterity = Random.Range(1,10);
     newEquipment.Occult = Random.Range(1,10);
     newEquipment.Intellect = Random.Range(1,10);
     newEquipment.Wisdom = Random.Range(1,10);
     newEquipment.Luck = Random.Range(1,10);
 }
예제 #26
0
 private void CreateEquipment()
 {
     _newEquipment = new BaseEquipment
     {
         ItemName        = _itemNames[Random.Range(0, 3)] + " Item",
         ItemId          = Random.Range(0, 101),
         Resistance      = Random.Range(1, 11),
         Dexterity       = Random.Range(1, 11),
         Strength        = Random.Range(1, 11),
         Intellect       = Random.Range(1, 11),
         SpellEffectId   = Random.Range(1, 11),
         ItemDescription = _itemDescription[Random.Range(0, _itemDescription.Length)]
     };
     ChooseItemType();
 }
예제 #27
0
 public void CreateEquipment()
 {
     newEquipment                 = new BaseEquipment();
     newEquipment.ItemName        = itemNames[Random.Range(0, 3)] + " Item";
     newEquipment.ItemID          = Random.Range(0, 101);
     newEquipment.ItemDescription = itemDes[Random.Range(0, itemDes.Length)];
     // newEquipment.ItemDescription = newEquipment.ItemName + "of a POWER";
     ChooseItemType();
     //stats
     newEquipment.strength  = Random.Range(1, 28);          //strength
     newEquipment.stamina   = Random.Range(1, 28);          //stamina
     newEquipment.intellect = Random.Range(1, 28);          //intellect
     newEquipment.agility   = Random.Range(1, 28);          //agility
     newEquipment.endurance = Random.Range(1, 28);          //endurance
 }
예제 #28
0
 public void CreateEquipment()
 {
     newEquipment = gameObject.AddComponent <BaseEquipment>();
     newEquipment.ItemDescription = itemDes[Random.Range(0, itemDes.Length)];
     newEquipment.ItemName        = itemNames[Random.Range(0, 3)] + " Item";
     newEquipment.ItemID          = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.Stamina   = Random.Range(1 * GameInformation.PlayerLevel, 11 * GameInformation.PlayerLevel);
     newEquipment.Endurance = Random.Range(1 * GameInformation.PlayerLevel, 11 * GameInformation.PlayerLevel);
     newEquipment.Intellect = Random.Range(1 * GameInformation.PlayerLevel, 11 * GameInformation.PlayerLevel);
     newEquipment.Strength  = Random.Range(1 * GameInformation.PlayerLevel, 11 * GameInformation.PlayerLevel);
     newEquipment.Agility   = Random.Range(1 * GameInformation.PlayerLevel, 11 * GameInformation.PlayerLevel);
     agility = newEquipment.Agility;
     newEquipment.Mastery = Random.Range(1 * GameInformation.PlayerLevel, 6 * GameInformation.PlayerLevel);
 }
예제 #29
0
    public void CreateEquipment()
    {
        newEquipment = new BaseEquipment();

        newEquipment.ItemName        = itemNames[Random.Range(0, 3)] + " item";
        newEquipment.ItemDescription = "This is an equipemnt";
        newEquipment.ItemID          = Random.Range(1, 101);

        newEquipment.Stamina      = Random.Range(1, 11);
        newEquipment.Endurance    = Random.Range(1, 11);
        newEquipment.Intelligence = Random.Range(1, 11);
        newEquipment.Strength     = Random.Range(1, 11);

        ChooseEquipmentType();
    }
예제 #30
0
    public override void Equip()
    {
        BaseEquipment currenHeadEquipment = _equipmentOwner.HeadEquipment;

        if (currenHeadEquipment != null)
        {
            currenHeadEquipment.Unequip();
        }

        transform.parent                  = _equipmentOwner.HeadTransform;
        transform.localPosition           = positionOffSet;
        transform.localRotation           = Quaternion.Euler(roationOffset);
        _equipmentOwner.HeadEquipment     = this;
        GetComponent <Collider>().enabled = false;
        gameObject.SetActive(true);
    }
예제 #31
0
 public void CreateEquipment()
 {
     newEquipment          = new BaseEquipment();
     newEquipment.ItemName = itemNames[Random.Range(0, 3)] + " Item";
     newEquipment.ItemID   = Random.Range(1, 101);
     ChooseItemType();
     newEquipment.ItemDescription = itemDescription[Random.Range(0, itemDescription.Length)];
     //Stats
     newEquipment.Health       = Random.Range(0, 10);
     newEquipment.Mana         = Random.Range(0, 10);
     newEquipment.Strength     = Random.Range(0, 10);
     newEquipment.Intelligence = Random.Range(0, 10);
     newEquipment.Dexterity    = Random.Range(0, 10);
     //Assing Spell Effect ID
     newEquipment.SpellEffectID = Random.Range(1, 101);
 }
예제 #32
0
    public void SetupEquipmentLogic(BaseEquipment equipment, bool equip)
    {
        switch (equipment._EquipmentType)
        {
        case EquipmentType.Helmet:
            SetupHead(equipment as BaseHelmet, equip);
            break;

        case EquipmentType.Armor:
            SetupTorso(equipment as BaseArmor, equip);
            break;

        case EquipmentType.MeleeWeapon:
            SetupMeleeWeapon(equipment as MeleeWeapon, equip);
            break;
        }
    }
예제 #33
0
        public void Start(BaseEquipment be)
        {
            this.be = be;

            comboBox1.Items.Clear();
            comboBox1.Items.AddRange(Enum.GetNames(typeof(BaseEquipment.EQUIP_TYPES)));
            comboBox1.SelectedIndex = (int)be.EquipType;

            comboBox2.Items.Clear();
            comboBox2.Items.AddRange(Enum.GetNames(typeof(BaseEquipment.ARMOUR_TYPES)));
            comboBox2.SelectedIndex = (int)be.ArmourUseType;

            comboBox3.Items.Clear();
            comboBox3.Items.AddRange(Enum.GetNames(typeof(BaseClass.CLASSType)));
            comboBox3.SelectedIndex = (int)be.WeaponUseType;

            Show();
        }
/*
 *      void Start()
 *      {
 *              CreateEquipmentBandana ();
 *              Debug.Log (newEquipment.ItemName);
 *              Debug.Log (newEquipment.ItemDescription);
 *              Debug.Log (newEquipment.ItemID.ToString());
 *              Debug.Log (newEquipment.WeaponType);
 *              Debug.Log (newEquipment.DEF.ToString());
 *              Debug.Log (newEquipment.MDEF.ToString());
 *              Debug.Log (newEquipment.MATK.ToString());
 *      }
 */

    public void CreateEquipmentBandana()
    {
        newEquipment = new BaseEquipment();
        //Assign Name
        newEquipment.ItemName = "Bandana";
        //Description
        newEquipment.ItemDescription = "A small cloth bandana used for protection.";
        //ID
        newEquipment.ItemID = 26;
        //Stats
        newEquipment.DEF  = 0;
        newEquipment.MATK = 3;
        newEquipment.MDEF = 0;
        //Type
        newEquipment.EquipmentType = BaseEquipment.EquipmentTypes.HEAD;
        //Spell EffectID
        //newWeapon.SpellEffectID = Effect Here
    }
예제 #35
0
        private void SaveEdit_btn_Click(object sender, RoutedEventArgs e)
        {
            BaseEquipment t     = new BaseEquipment();
            bool          check = true;

            t.Description = EditDescr_txtbx.Text;
            t.FullName    = EditName_txtbl.Text;
            t.OfferNum    = EditOffer_txtbx.Text;
            t.ShortType   = EditTypeOfEq_cbx.SelectedItem.ToString();
            try
            {
                t.InPrise = double.Parse(EditInPrice_txtbx.Text);
            }
            catch (Exception)
            {
                check = false;
                MessageBox.Show("Не равильно задана входная цена");
            }
            try
            {
                t.K = int.Parse(EditK_txtbx.Text);
            }
            catch (Exception)
            {
                check = false;
                MessageBox.Show("Не равильно задан коэффициент");
            }
            try
            {
                t.Price = int.Parse(EditPrice_txtbx.Text);
            }
            catch (Exception)
            {
                check = false;
                MessageBox.Show("Не равильно задана цена");
            }
            if (check && t != null)
            {
                MainWindow.s = t;
                DialogResult = true;
                Close();
            }
        }
예제 #36
0
 public BaseItem CreateAItem(int ItemSelection)
 {
     if (ItemSelection == 1) {
         anEquipment = newEquipment.CreateEquipment ();
         return anEquipment;
     } else if (ItemSelection == 2) {
         aWeapon = newWeapon.CreateWeapon ();
         return aWeapon;
     } else if (ItemSelection == 3) {
         aPotion = newPotion.CreatePotion ();
         return aPotion;
     } else if (ItemSelection == 4) {
         aScroll = newScroll.CreateScroll ();
         return aScroll;
     } else {
         anEquipment = newEquipment.CreateEquipment ();
         return anEquipment;
     }
 }
예제 #37
0
 public EditEqWin(BaseEquipment item)
 {
     InitializeComponent();
     if (item != null)
     {
         EditPrice_txtbx.Text   = item.Price.ToString();
         EditK_txtbx.Text       = item.K.ToString();
         EditName_txtbl.Text    = item.FullName;
         EditOffer_txtbx.Text   = item.OfferNum;
         EditInPrice_txtbx.Text = item.InPrise.ToString();
         EditDescr_txtbx.Text   = item.Description;
         foreach (var t in be.TypeOfEquipment.Keys)
         {
             if (t == item.ShortType)
             {
                 EditTypeOfEq_cbx.SelectedItem = t;
             }
         }
     }
 }
예제 #38
0
    public void CreateEquipment()
    {
        newEquipment = new BaseEquipment ();

        //assign Base Item
        newEquipment.ItemName = itemNames[Random.Range (0,itemNames.Length)]+ " item";
        newEquipment.ItemDescription = itemDescr[Random.Range (0,itemDescr.Length)];
        newEquipment.ItemID = Random.Range (1, 101);

        //assign Base stat
        newEquipment.Size=Random.Range(1,101);
        newEquipment.Durability=Random.Range(1,101);
        newEquipment.Itemlevel=Random.Range(1,101);
        newEquipment.Itemlevelreq=Random.Range(1,101);

        newEquipment.SpellEffectID=Random.Range (1, 101);
        newEquipment.Armor=Random.Range(1, 10);

        //WeaponType
        ChooseEquipmentType ();
    }
예제 #39
0
    public static void loadEquipment()
    {
        string path = "URI=file:" + Application.dataPath + "/Database/Database.s3db";
        IDbConnection connection;

        connection = (IDbConnection)new SqliteConnection(path);
        connection.Open();
        IDbCommand command = connection.CreateCommand();
        string sqlQuery = "SELECT * FROM Items_Equipment;";
        command.CommandText = sqlQuery;
        IDataReader reader = command.ExecuteReader();
        while (reader.Read())
        {
            BaseEquipment be = new BaseEquipment();
            be.ItemID = reader.GetInt32 (0);
            be.EquipType = (BaseEquipment.EquipTypes)reader.GetInt32 (1);
            //be.SpecialStatID = reader.GetInt32 (3);
            equipmentData[be.ItemID] = be;
        }
        reader.Close();
        command.Dispose();
        connection.Close();
    }
예제 #40
0
 public BaseEquipment CreateEquipment()
 {
     anEquipment = newEquipment.CreateEquipment ();
     return anEquipment;
 }
예제 #41
0
 public void Setup(BaseEquipment thisWeapon)
 {
     curEquipment = thisWeapon;
     //scalingBuff.SetScaling(curEquipment.user.CharStats);
 }
 void Awake()
 {
     _weapon = GetComponent<BaseEquipment>();
     _user = transform.parent.GetComponent<BaseCharacter>();
 }
예제 #43
0
    public override void Setup(BaseEquipment weapon, MovesetType type)
    {
        base.Setup (weapon, type);

        combo1.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.Combo1);
        combo2.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.Combo2);
        combo3.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.Combo3);
        runAttack.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.RunAttack);
        dodgeAttack.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.DodgeAttack);

        moveset.Add (combo1);
        moveset.Add (combo2);
        moveset.Add (combo3);
        moveset.Add (runAttack);
        moveset.Add (dodgeAttack);
    }
 protected override void OnAwake()
 {
     user = transform.root.GetComponent<BaseCharacter> ();
     curEquipment = GetComponent<BaseEquipment>();
     anim = GetComponent<MeshRenderer> ();
 }
예제 #45
0
 public virtual void Setup(BaseEquipment weapon, MovesetType type)
 {
     _weapon = weapon;
     _user = weapon.User;
     _userState = _user.CharState;
 }
예제 #46
0
 public override void Setup(BaseEquipment weapon, MovesetType type)
 {
     base.Setup (weapon, type);
     combo5.SetValue (weapon, BaseEquipmentProperties.EquipmentActions.Combo5);
     moveset.Add (combo5);
 }
예제 #47
0
 public virtual void SetValue(BaseEquipment weapon, BaseEquipmentProperties.EquipmentActions name)
 {
     base.SetValue (weapon.User);
     _weapon = weapon;
     _hitbox = weapon.HitBox;
     attackName = name;
 }
예제 #48
0
    //    public override void OnTriggerEnter (Collider hit) {
    //        Debug.Log ("Hit Registered!");
    //        BaseCharacter target;
    //
    //        if (hit.transform.GetComponent<BaseCharacter>()) {
    //            Debug.LogError ("LANDED A HIT!!!");
    //            target = hit.transform.GetComponent<BaseCharacter> ();
    //            if (target.CharType != User.CharType)
    //                target.CharActions.CharStatus.ApplyAttack (this, User.Coordinates);
    //        } else
    //            Debug.LogError ("Well something weird is going on...");
    ////		_weapon.ActiveAttack = null;
    //    }
    public override void SetValue(BaseEquipment weapon, BaseEquipmentProperties.EquipmentActions name)
    {
        base.SetValue (weapon, name);
        //		Debug.LogError ("Setting weapon values...");
        switch (attackType) {
        case AttackPropertyType.Standard:
            enterAbility = delegate {
                direction = (CharInput.LookDir - User.Coordinates.position);
                if (_weapon.ActiveAttack != this)
                    _weapon.ActiveAttack = this;

                _weapon.WeaponProperties.anim.material.color = Color.grey;
            };
            activeAbility = delegate {
                _hitbox.enabled = true;
                Aim ();
                BurstMove (activeMoveSpeed);
                _weapon.WeaponProperties.anim.material.color = Color.red;
            };
            exitAbility = delegate {
                _hitbox.enabled = false;
                _weapon.WeaponProperties.anim.material.color = Color.grey;
            };
            break;

        case AttackPropertyType.Charge:
        case AttackPropertyType.Multi:
        case AttackPropertyType.Counter:
        default:
            Debug.LogError ("Attack Type was not set properly!");
            break;
        }
    }