Beispiel #1
0
        internal override void OnAdd()
        {
            for (int i = 0; i < 5; i++)
            {
                ListBoxItem gunItem = listBoxCom.CreateLabelItem("手枪" + i.ToString());
                var         gun     = gunItem.AddComponent <Gun>();
                gun.AM = 6;

                gunItem = listBoxCom.CreateLabelItem("步枪" + i.ToString());
                gun     = gunItem.AddComponent <Gun>();
                gun.AM  = 16;
            }
        }