コード例 #1
0
ファイル: CreateNewScroll.cs プロジェクト: mixterj/unity
	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);
	}
コード例 #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);
                    }
                }
            }
コード例 #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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 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);
 }
コード例 #6
0
	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 ();
	}
コード例 #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);
 }
コード例 #8
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);
 }
コード例 #9
0
ファイル: CreateNewScroll.cs プロジェクト: katongoukakyuu/RPG
 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);
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #12
0
ファイル: CreateNewScroll.cs プロジェクト: railgan/IdleGame
 public BaseScroll CreateScroll()
 {
     newScroll = new BaseScroll();
     newScroll.ItemName = "Scroll";
     newScroll.ItemDescription = "This is a Scroll.";
     newScroll.ItemID = Random.Range(1,101);
     ChooseScrollType();
     return newScroll;
 }
コード例 #13
0
    private void CreateScroll()
    {
        newScroll = new BaseScroll();

        ChooseScrollType();
        SetScrollName();
        newScroll.ItemID          = Random.Range(1, 101);
        newScroll.ItemDescription = "This item is a " + newScroll.ItemName;
    }
コード例 #14
0
ファイル: CreateNewScroll.cs プロジェクト: thekrakenisme/RPG
 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);
 }
コード例 #15
0
ファイル: CreateNewScroll.cs プロジェクト: davespoon/RPG-Game
 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
     };
 }
コード例 #16
0
ファイル: CreateItem.cs プロジェクト: railgan/IdleGame
 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;
     }
 }
コード例 #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;
            }
コード例 #18
0
 public static void Init(BaseScroll Func_Hotkey_Scroll, Settings settings)
 {
     Hotkey_UI(Func_Hotkey_Scroll, settings.Hotkey);
 }
コード例 #19
0
 public void SetInstance(BaseScroll instance)
 {
     this.instance = instance;
 }