Beispiel #1
0
	private void CreateScroll (){
		newScroll = new BaseScroll ();
		newScroll.ItemName = "Scroll";
		newScroll.ItemDsecription = "This is a scroll";
		newScroll.ItemID = Random.Range(1, 101);
		newScroll.SpellEffectID = Random.Range(500, 1001);
	}
Beispiel #2
0
            //快捷键
            public static void Hotkey_UI(BaseScroll Func_Hotkey_Scroll, Settings.HotkeyConfig HotkeyConfig)
            {
                foreach (var i in AccessTools.GetFieldNames(HotkeyConfig))
                {
                    var Field = AccessTools.Field(HotkeyConfig.GetType(), i);
                    if (Field.FieldType == typeof(ConfigEntry <KeyboardShortcut>))
                    {
                        var Container = new Container
                        {
                            Name  = i,
                            Group =
                            {
                                Spacing   = 2,
                                Direction = Direction.Horizontal
                            },
                            Element =
                            {
                                PreferredSize = { 0, 50 }
                            },
                            Children =
                            {
                                new TaiwuLabel
                                {
                                    Name        = "TitleLabel",
                                    Text        = (Field.GetValue(HotkeyConfig) as ConfigEntry <KeyboardShortcut>).Description.Description,
                                    UseBoldFont = true,
                                    UseOutline  = true,
                                    Element     =
                                    {
                                        PreferredSize ={                     200, 0 }
                                    }
                                },
                                new TaiwuLabel
                                {
                                    Name            = "ValueLabel",
                                    Text            = Hotkey_ToString((Field.GetValue(HotkeyConfig) as ConfigEntry <KeyboardShortcut>).Value),
                                    BackgroundStyle = TaiwuLabel.Style.Value
                                },
                                new TaiwuButton
                                {
                                    Name    = i,
                                    Text    = "修改快捷键",
                                    Element =
                                    {
                                        PreferredSize ={                     200, 0 }
                                    },
                                    UseBoldFont = true,
                                    OnClick     = (Button bt) =>
                                    {
                                        var KeyboardMonitor = Func_Hotkey_Scroll.Get <KeyboardMonitor>();
                                        KeyboardMonitor.Monitoring(AccessTools.Field(HotkeyConfig.GetType(), bt.Name), bt.Parent.Children[1] as TaiwuLabel, bt);
                                    }
                                }
                            }
                        };

                        Func_Hotkey_Scroll.Add(i, Container);
                    }
                }
            }
Beispiel #3
0
 public void createScroll()
 {
     newScroll                 = new BaseScroll();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "A new awsome scroll!";
     newScroll.ItemID          = Random.Range(1, 101);
     newScroll.SpellEffectID   = Random.Range(500, 1001);
 }
 private void CreateScroll()
 {
     newScroll                 = new BaseScroll();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "A powerful scroll";
     newScroll.ItemId          = Random.Range(1, 101);
     newScroll.SpellEffectId   = Random.Range(500, 1000);
 }
 private void CreateScroll()
 {
     newScroll                 = new BaseScroll();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "This is a scroll.";
     newScroll.ItemID          = Random.Range(1, 200);
     newScroll.SpellEffectID   = "Damage: " + Random.Range(500, 1000);
 }
	private void CreateScroll(){
		newScroll = new BaseScroll ();
		newScroll.ItemName = "Scroll";
		newScroll.ItemDescription = "This is a powerful scroll.";
		newScroll.ItemID = Random.Range (1, 101);
		newScroll.ScrollEffectID = Random.Range (500, 1001);
		ChooseScrollType ();
	}
Beispiel #7
0
 private void CreateScroll()
 {
     newScroll                 = gameObject.AddComponent <BaseScroll>();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "This Scroll Contains Magical Powers";
     newScroll.ItemID          = Random.Range(1, 101);
     newScroll.SpellEffectID   = Random.Range(500, 1001);
 }
 public void createScroll()
 {
     newScroll = new BaseScroll();
     newScroll.ItemName = "Scroll";
     newScroll.ItemDescription = "A new awsome scroll!";
     newScroll.ItemID = Random.Range(1, 101);
     newScroll.SpellEffectID = Random.Range(500, 1001);
 }
Beispiel #9
0
 private void CreateScroll()
 {
     newScroll = new BaseScroll ();
     newScroll.itemName = "Scroll";
     newScroll.itemDescription = "This is a powerful scroll.";
     newScroll.itemID = Random.Range (1, 101);
     newScroll.spellEffectID = Random.Range (1, 101);
 }
Beispiel #10
0
 private void CreateScroll()
 {
     newScroll                 = new BaseScroll();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "Powerfull Scroll of {0}";
     newScroll.ItemID          = Random.Range(0, 101);
     newScroll.spellEffectID   = Random.Range(500, 1001);
 }
Beispiel #11
0
 private void CreateScroll()
 {
     newScroll                 = new BaseScroll();
     newScroll.ItemName        = "Scroll";
     newScroll.ItemDescription = "This is a powerfull scroll!";
     newScroll.ItemID          = Random.Range(1, 101);
     newScroll.SpellEffectID   = Random.Range(500, 1001);
 }
Beispiel #12
0
 public BaseScroll CreateScroll()
 {
     newScroll = new BaseScroll();
     newScroll.ItemName = "Scroll";
     newScroll.ItemDescription = "This is a Scroll.";
     newScroll.ItemID = Random.Range(1,101);
     ChooseScrollType();
     return newScroll;
 }
Beispiel #13
0
    private void CreateScroll()
    {
        newScroll = new BaseScroll();

        ChooseScrollType();
        SetScrollName();
        newScroll.ItemID          = Random.Range(1, 101);
        newScroll.ItemDescription = "This item is a " + newScroll.ItemName;
    }
Beispiel #14
0
 private void CreateScroll()
 {
     newScroll = new BaseScroll();
     newScroll.ItemName = itemNames[Random.Range(0,4)] + " scroll";
     newScroll.ItemDescription = itemDescription[Random.Range(0,itemDescription.Length)];
     newScroll.ItemID = Random.Range(1,101);
     ChooseScrollType();
     newScroll.SpellEffectID = Random.Range(1,101);
 }
Beispiel #15
0
 private void CreateScroll()
 {
     _newScroll = new BaseScroll
     {
         ItemDescription = _scrollDescription,
         ItemId          = Random.Range(1, 101),
         ItemName        = _scrollNames[Random.Range(0, 3)],
         SpellEffectId   = Random.Range(101, 201),
         ItemType        = BaseItem.ItemTypes.Scroll
     };
 }
Beispiel #16
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;
     }
 }
Beispiel #17
0
            public static void Init(Container Func_AddItem_Container, Settings settings)
            {
                var TabFuncAddItem = Func_AddItem_Container.Get <TabFuncAddItem>();

                TabFuncAddItem.SetInstance(Func_AddItem_Container);

                TopOfFuncAddItemContainer(Func_AddItem_Container);
                BaseScroll baseScroll;

                (baseScroll = new BaseScroll
                {
                    Name = "ItemShowerHandle",
                    Group =
                    {
                        Direction             = Direction.Vertical,
                        Spacing               =                  0,
                        Padding               = { 10 },
                        ForceExpandChildWidth = true
                    }
                }).SetParent(Func_AddItem_Container);
                TabFuncAddItem.valueHander = baseScroll;
            }
Beispiel #18
0
 public static void Init(BaseScroll Func_Hotkey_Scroll, Settings settings)
 {
     Hotkey_UI(Func_Hotkey_Scroll, settings.Hotkey);
 }
Beispiel #19
0
 public void SetInstance(BaseScroll instance)
 {
     this.instance = instance;
 }