Esempio n. 1
0
    //--------------------------------------------------------------------------------------------------------------

    #region Operations

    /// <summary>
    ///     Add a card to the pile.
    /// </summary>
    /// <param name="card"></param>
    public virtual void AddJewel(IUiJewel jewel)
    {
      if (jewel == null)
        throw new ArgumentNullException("Null is not a valid argument.");

      Jewels.Add(jewel);
      jewel.transform.SetParent(transform);
      //Debug.Log("AddJewel");
      //jewel.Renderer.sprite = jewel.Data.Artwork;
      jewel.Initialize();
      NotifyPileChange();
      jewel.Draw();
    }
Esempio n. 2
0
        public DataContext()
        {
            for (uint i = 0; i < 256; i++)
            {
                BattleItems.Add(new Item(0x37590 + i * 8));
            }

            for (uint i = 0; i < 1024; i++)
            {
                OtherItems.Add(new Item(0x37D90 + i * 8));
            }

            for (uint i = 0; i < 200; i++)
            {
                Charactors.Add(new Charactor(0x700 + i * 1062));
            }

            for (uint i = 0; i < 120; i++)
            {
                Jewels.Add(new Jewel(0x46380 + i * 8));
            }

            for (uint i = 0; i < 12; i++)
            {
                Party.Add(new Member(0x6D0 + i * 4));
            }

            foreach (var info in Info.Instance().Places)
            {
                Places.Add(new Place(info));
            }

            foreach (var info in Info.Instance().Minds)
            {
                Minds.Add(new MindQuest(info));
            }

            foreach (var info in Info.Instance().Medals)
            {
                Medals.Add(new Medal(info));
            }
        }
Esempio n. 3
0
    public override void OnInspectorGUI()
    {
        if (GUILayout.Button("Add Jewel"))
        {
            jewels.Add();
        }

        foreach (var item in jewels.list)
        {
            GUILayout.BeginHorizontal();
            if (GUILayout.Button(item.type.ToString()))
            {
                JewelTemplate.Init(item);
            }
            GUI.color = Color.red;
            if (GUILayout.Button("Remove"))
            {
                jewels.Remove(item);
                break;
            }
            GUILayout.EndHorizontal();
            GUI.color = Color.white;
        }
    }