Exemplo n.º 1
0
        protected override void Init()
        {
            MsgText     = GetChildText("MsgText");
            CreateDBBtn = GetChildButton("CreateDBBtn");
            AddBtn      = GetChildButton("AddBtn");
            UpdateBtn   = GetChildButton("UpdateBtn");
            DeleteBtn   = GetChildButton("DeleteBtn");

            EventTriggerListener.Get(CreateDBBtn.gameObject).onClick += onClick;
            EventTriggerListener.Get(AddBtn.gameObject).onClick      += onClick;
            EventTriggerListener.Get(UpdateBtn.gameObject).onClick   += onClick;
            EventTriggerListener.Get(DeleteBtn.gameObject).onClick   += onClick;

            DbAccess db = new DbAccess("LocalData.db");

            db.CreateTable("test", new string[] { "name", "qq", "email", "blog" }, new string[] { "text", "text", "text", "text" });
            db.CloseSqlConnection();
        }
Exemplo n.º 2
0
        protected override void Init()
        {
            canGo = false;
            DontDestroyOnLoad(gameObject);
            sunAndMoonImage = GetChildImage("sunAndMoonImage");
            timeText        = GetChildText("timeText");
            settingBtn      = GetChildButton("SettingBtn");
            EventTriggerListener.Get(settingBtn.gameObject).onClick = onClick;
            viewTimesButton = GetChildButton("viewTimesButton");
            EventTriggerListener.Get(viewTimesButton.gameObject).onClick = onClick;
            timeNames          = Statics.GetTimeNames();
            _currentTimeIndex  = -1;
            lastTimeIndex      = _currentTimeIndex;
            currentAngle       = 0;
            oldAngle           = -1;
            angleRotateDate    = DateTime.Now;
            angleRotateTimeout = 1f;             //20秒旋转1度
//			resetTimeIndex();
        }
Exemplo n.º 3
0
 protected override void Init()
 {
     icons = new List <Image>()
     {
         GetChildImage("icon0"),
         GetChildImage("icon1"),
         GetChildImage("icon2"),
         GetChildImage("icon3"),
         GetChildImage("icon4"),
         GetChildImage("icon5")
     };
     iconBtns = new List <Button>()
     {
         GetChildButton("icon0"),
         GetChildButton("icon1"),
         GetChildButton("icon2"),
         GetChildButton("icon3"),
         GetChildButton("icon4"),
         GetChildButton("icon5")
     };
     injuryImages = new List <Image>()
     {
         GetChildImage("injuryImage0"),
         GetChildImage("injuryImage1"),
         GetChildImage("injuryImage2"),
         GetChildImage("injuryImage3"),
         GetChildImage("injuryImage4"),
         GetChildImage("injuryImage5")
     };
     for (int i = 0; i < iconBtns.Count; i++)
     {
         EventTriggerListener.Get(iconBtns[i].gameObject).onClick += onClick;
     }
     bagButton = GetChildButton("bagButton");
     EventTriggerListener.Get(bagButton.gameObject).onClick += onClick;
     booksButton = GetChildButton("booksButton");
     EventTriggerListener.Get(booksButton.gameObject).onClick += onClick;
     weaponsButton = GetChildButton("weaponsButton");
     EventTriggerListener.Get(weaponsButton.gameObject).onClick += onClick;
     weaponsRedPointImage = GetChildImage("weaponsRedPointImage");
     booksRedPointImage   = GetChildImage("booksRedPointImage");
     bagRedPointImage     = GetChildImage("bagRedPointImage");
 }
Exemplo n.º 4
0
 protected override void Init()
 {
     bg = GetComponent <CanvasGroup>();
     bg.DOFade(0, 0);
     grid     = GetChildGridLayoutGroup("Grid");
     startBtn = GetChildButton("StartBtn");
     backBtn  = GetChildButton("BackBtn");
     EventTriggerListener.Get(startBtn.gameObject).onClick = onClick;
     EventTriggerListener.Get(backBtn.gameObject).onClick  = onClick;
     foodIcon      = GetChildImage("FoodIcon");
     foodNumText   = GetChildText("FoodNumText");
     selectedIcons = new List <Image>()
     {
         GetChildImage("icon0"),
         GetChildImage("icon1"),
         GetChildImage("icon2"),
         GetChildImage("icon3"),
         GetChildImage("icon4"),
         GetChildImage("icon5")
     };
     for (int i = 0, len = selectedIcons.Count; i < len; i++)
     {
         EventTriggerListener.Get(selectedIcons[i].gameObject).onClick = onClick;
     }
     seatCovers = new List <Image>()
     {
         GetChildImage("seatCover0"),
         GetChildImage("seatCover1"),
         GetChildImage("seatCover2"),
         GetChildImage("seatCover3"),
         GetChildImage("seatCover4"),
         GetChildImage("seatCover5")
     };
     for (int i = 0, len = seatCovers.Count; i < len; i++)
     {
         EventTriggerListener.Get(seatCovers[i].gameObject).onClick = onClick;
     }
     totalText         = GetChildText("TotalText");
     hostRoleContainer = GetChildComponent <ReadyToTraveRoleContainer>(gameObject, "ReadyToTraveRoleContainer");
     roleContainers    = new List <ReadyToTraveRoleContainer>();
     selectedRolesData = new List <RoleData>();
 }
Exemplo n.º 5
0
        protected override void Init()
        {
            foodIcon        = GetChildImage("foodIcon");
            foodProcessText = GetChildText("foodProcessText");
            moveBtn         = GetChildButton("moveBtn");
            EventTriggerListener.Get(moveBtn.gameObject).onClick += onClick;
            point01      = GetChildImage("point01");
            upArrow      = GetChildImage("upArrow");
            downArrow    = GetChildImage("downArrow");
            leftArrow    = GetChildImage("leftArrow");
            rightArrow   = GetChildImage("rightArrow");
            positionText = GetChildText("positionText");
            areaNameText = GetChildText("areaNameText");
            propsNumText = new List <Text>()
            {
                GetChildText("prop1NumText"),
                GetChildText("prop2NumText"),
                GetChildText("prop3NumText"),
                GetChildText("prop4NumText")
            };
            prop1BlockImage = GetChildImage("prop1BlockImage");
            EventTriggerListener.Get(prop1BlockImage.gameObject).onClick = onClick;
            prop2BlockImage = GetChildImage("prop2BlockImage");
            EventTriggerListener.Get(prop2BlockImage.gameObject).onClick = onClick;
            prop3BlockImage = GetChildImage("prop3BlockImage");
            EventTriggerListener.Get(prop3BlockImage.gameObject).onClick = onClick;
            prop4BlockImage = GetChildImage("prop4BlockImage");
            EventTriggerListener.Get(prop4BlockImage.gameObject).onClick = onClick;
            point01.gameObject.SetActive(false);
            date        = Time.fixedTime;
            moveTimeout = 0.3f;

            propsData = new List <PropData>()
            {
                new PropData(PropType.NocturnalClothing, 0),
                new PropData(PropType.Bodyguard, 0),
                new PropData(PropType.LimePowder, 0),
                new PropData(PropType.Scout, 0)
            };

            difficultyText = GetChildText("difficultyText");
        }
Exemplo n.º 6
0
        protected override void Init()
        {
            bg    = GetChildImage("Bg");
            block = GetChildButton("Block");
            EventTriggerListener.Get(block.gameObject).onClick = onClick;
            iconImage  = GetChildImage("IconImage");
            flashImage = GetChildImage("flashImage");
            nameText   = GetChildText("NameText");
            descText   = GetChildText("DescText");
//			gridTrans = GetChildComponent<RectTransform>(gameObject, "Grid");
//			emptyImage = GetChildImage("emptyImage");
//			containers = new List<SkillItemContainer>();
//			initedGrid = false;
            descBgImage     = GetChildImage("descBgImage");
            titleText       = GetChildText("titleText");
            secretsDescText = GetChildText("secretsDescText");
            studyBtn        = GetChildButton("studyBtn");
            EventTriggerListener.Get(studyBtn.gameObject).onClick = onClick;
            studyText = GetChildText("studyText");
        }
Exemplo n.º 7
0
        protected override void Init()
        {
            bg = GetChildImage("Bg");
            bg.transform.DOScale(0, 0);
            block = GetChildButton("Block");
            EventTriggerListener.Get(block.gameObject).onClick = onClick;
            icon       = GetChildImage("Icon");
            flashImage = GetChildImage("flashImage");
            nameText   = GetChildText("NameText");
//			weaponWidthScript = GetChildComponent<WeaponWidth>(gameObject, "WeaponWidth");
            infoBgImage      = GetChildImage("InfoBgImage");
            infoText         = GetChildText("InfoText");
            descBgImage      = GetChildImage("DescBgImage");
            descText         = GetChildText("DescText");
            occupationText   = GetChildText("OccupationText");
            toolGridRect     = GetChildComponent <RectTransform>(gameObject, "toolGrid");
            lvFullNoticeText = GetChildText("lvFullNoticeText");
            lvUpgradeBtn     = GetChildButton("lvUpgradeBtn");
            EventTriggerListener.Get(lvUpgradeBtn.gameObject).onClick = onClick;
        }
Exemplo n.º 8
0
 protected override void Init()
 {
     bg    = GetChildImage("Bg");
     block = GetChildImage("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     iconImage              = GetChildImage("iconImage");
     hpFromText             = GetChildText("hpFromText");
     hpToText               = GetChildText("hpToText");
     physicsAttackFromText  = GetChildText("physicsAttackFromText");
     physicsAttackToText    = GetChildText("physicsAttackToText");
     physicsDefenseFromText = GetChildText("physicsDefenseFromText");
     physicsDefenseToText   = GetChildText("physicsDefenseToText");
     magicAttackFromText    = GetChildText("magicAttackFromText");
     magicAttackToText      = GetChildText("magicAttackToText");
     magicDefenseFromText   = GetChildText("magicDefenseFromText");
     magicDefenseToText     = GetChildText("magicDefenseToText");
     dodgeFromText          = GetChildText("dodgeFromText");
     dodgeToText            = GetChildText("dodgeToText");
     date = Time.fixedTime;
 }
Exemplo n.º 9
0
 protected override void Init()
 {
     bg    = GetChildImage("Bg");
     block = GetChildButton("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     icon            = GetChildImage("Icon");
     nameText        = GetChildText("NameText");
     typeText        = GetChildText("TypeText");
     lvText          = GetChildText("LvText");
     numText         = GetChildText("NumText");
     sellFlagText    = GetChildText("SellFlagText");
     silverImage     = GetChildImage("SilverImage");
     sellPriceText   = GetChildText("SellPriceText");
     discardFlagText = GetChildText("DiscardFlagText");
     descText        = GetChildText("DescText");
     destroyBtn      = GetChildButton("DestroyBtn");
     EventTriggerListener.Get(destroyBtn.gameObject).onClick = onClick;
     useBtn = GetChildButton("UseBtn");
     EventTriggerListener.Get(useBtn.gameObject).onClick = onClick;
 }
Exemplo n.º 10
0
 protected override void Init()
 {
     bg    = GetChildImage("Bg");
     block = GetChildButton("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     roleIconImage   = GetChildImage("RoleIconImage");
     descText        = GetChildText("DescText");
     infoText        = GetChildText("InfoText");
     weaponIconImage = GetChildImage("WeaponIconImage");
     bookIconImage0  = GetChildImage("BookIconImage0");
     bookIconImage1  = GetChildImage("BookIconImage1");
     bookIconImage2  = GetChildImage("BookIconImage2");
     viewWeaponBtn   = GetChildButton("ViewWeaponBtn");
     EventTriggerListener.Get(viewWeaponBtn.gameObject).onClick = onClick;
     viewBookBtn0 = GetChildButton("ViewBookBtn0");
     EventTriggerListener.Get(viewBookBtn0.gameObject).onClick = onClick;
     viewBookBtn1 = GetChildButton("ViewBookBtn1");
     EventTriggerListener.Get(viewBookBtn1.gameObject).onClick = onClick;
     viewBookBtn2 = GetChildButton("ViewBookBtn2");
     EventTriggerListener.Get(viewBookBtn2.gameObject).onClick = onClick;
 }
Exemplo n.º 11
0
        protected override void Init()
        {
            bg    = GetChildImage("Bg");
            block = GetChildButton("Block");
            EventTriggerListener.Get(block.gameObject).onClick = onClick;
            closeBtn = GetChildButton("CloseBtn");
            EventTriggerListener.Get(closeBtn.gameObject).onClick = onClick;

            bGMOpenBtn = GetChildButton("BGMOpenBtn");
            EventTriggerListener.Get(bGMOpenBtn.gameObject).onClick = onClick;
            bGMCloseBtn = GetChildButton("BGMCloseBtn");
            EventTriggerListener.Get(bGMCloseBtn.gameObject).onClick = onClick;
            soundOpenBtn = GetChildButton("SoundOpenBtn");
            EventTriggerListener.Get(soundOpenBtn.gameObject).onClick = onClick;
            soundCloseBtn = GetChildButton("SoundCloseBtn");
            EventTriggerListener.Get(soundCloseBtn.gameObject).onClick = onClick;
            loadRecordListBtn = GetChildButton("LoadRecordListBtn");
            EventTriggerListener.Get(loadRecordListBtn.gameObject).onClick = onClick;
            backToMainMenuBtn = GetChildButton("BackToMainMenuBtn");
            EventTriggerListener.Get(backToMainMenuBtn.gameObject).onClick = onClick;
        }
Exemplo n.º 12
0
 protected override void Init()
 {
     bg    = GetChildImage("Bg");
     block = GetChildButton("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     closeBtn = GetChildButton("CloseBtn");
     EventTriggerListener.Get(closeBtn.gameObject).onClick = onClick;
     containers = new List <EnemyInfoContainer>()
     {
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer0"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer1"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer2"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer3"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer4"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer5"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer6"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer7"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer8"),
         GetChildComponent <EnemyInfoContainer>(gameObject, "EnemyInfoContainer9")
     };
 }
Exemplo n.º 13
0
 // Use this for initialization
 void Start()
 {
     EventTriggerListener.Get(PayBtn.gameObject).onClick = onClick;
     date   = DateTime.MinValue;
     timing = false;
     if (IsFree)
     {
         if (!string.IsNullOrEmpty(PlayerPrefs.GetString("BankFreeTimeStamp")))
         {
             date = Statics.ConvertStringToDateTime(PlayerPrefs.GetString("BankFreeTimeStamp"));
             double remain = remainSeconds();
             timing   = remain > 0;
             skipDate = Time.fixedTime;
             if (timing)
             {
                 TimerText.text = Statics.GetTime((int)remain);
             }
         }
     }
     TimerText.gameObject.SetActive(timing);
     PayBtn.gameObject.SetActive(!timing);
 }
Exemplo n.º 14
0
 protected override void Init()
 {
     bg    = GetChildImage("Bg");
     block = GetChildImage("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     sureBtn = GetChildButton("SureBtn");
     EventTriggerListener.Get(sureBtn.gameObject).onClick = onClick;
     date           = Time.fixedTime;
     occupationBtns = new List <Button>()
     {
         GetChildButton("EnterOccupation0"),
         GetChildButton("EnterOccupation1"),
         GetChildButton("EnterOccupation2"),
         GetChildButton("EnterOccupation3"),
         GetChildButton("EnterOccupation4"),
         GetChildButton("EnterOccupation5")
     };
     for (int i = 0, len = occupationBtns.Count; i < len; i++)
     {
         EventTriggerListener.Get(occupationBtns[i].gameObject).onClick = onClick;
     }
 }
Exemplo n.º 15
0
 // Use this for initialization
 void Start()
 {
     EventTriggerListener.Get(PayBtn.gameObject).onClick = onClick;
 }
Exemplo n.º 16
0
 void Start()
 {
     EventTriggerListener.Get(SureBtn.gameObject).onClick   = onClick;
     EventTriggerListener.Get(CancelBtn.gameObject).onClick = onClick;
 }
Exemplo n.º 17
0
 protected override void Init()
 {
     EventTriggerListener.Get(Block.gameObject).onClick = onClick;
 }
Exemplo n.º 18
0
 // Use this for initialization
 void Start()
 {
     EventTriggerListener.Get(UseBtn.gameObject).onClick   = onClick;
     EventTriggerListener.Get(UnuseBtn.gameObject).onClick = onClick;
     EventTriggerListener.Get(ViewBtn.gameObject).onClick  = onClick;
 }
Exemplo n.º 19
0
        protected override void Init()
        {
            icons = new List <Image>()
            {
                GetChildImage("icon0"),
                GetChildImage("icon1"),
                GetChildImage("icon2"),
                GetChildImage("icon3")
            };
            iconBtns = new List <Button>()
            {
                GetChildButton("icon0"),
                GetChildButton("icon1"),
                GetChildButton("icon2"),
                GetChildButton("icon3")
            };
            cdMasks = new List <Image>()
            {
                GetChildImage("cdMask0"),
                GetChildImage("cdMask1"),
                GetChildImage("cdMask2"),
                GetChildImage("cdMask3")
            };
            disableSeatMasks = new List <Image>()
            {
                GetChildImage("disableSeatMask0"),
                GetChildImage("disableSeatMask1"),
                GetChildImage("disableSeatMask2"),
                GetChildImage("disableSeatMask3")
            };
            disableBookMasks = new List <Image>()
            {
                GetChildImage("disableBookMask0"),
                GetChildImage("disableBookMask1"),
                GetChildImage("disableBookMask2")
            };
            injuryImages = new List <Image>()
            {
                GetChildImage("injuryImage0"),
                GetChildImage("injuryImage1"),
                GetChildImage("injuryImage2"),
                GetChildImage("injuryImage3")
            };
            for (int i = 0; i < iconBtns.Count; i++)
            {
                EventTriggerListener.Get(iconBtns[i].gameObject).onClick += onClick;
            }
            btnsObj   = GetChild("btns");
            bagButton = GetChildButton("bagButton");
            EventTriggerListener.Get(bagButton.gameObject).onClick += onClick;
            booksButton = GetChildButton("booksButton");
            EventTriggerListener.Get(booksButton.gameObject).onClick += onClick;
            expButton = GetChildButton("expButton");
            EventTriggerListener.Get(expButton.gameObject).onClick += onClick;
            weaponsButton = GetChildButton("weaponsButton");
            EventTriggerListener.Get(weaponsButton.gameObject).onClick += onClick;

            booksObj = GetChild("books");
            books    = new List <Image>()
            {
                GetChildImage("book0"),
                GetChildImage("book1"),
                GetChildImage("book2")
            };
            bookBtns = new List <Button>()
            {
                GetChildButton("bookBtn0"),
                GetChildButton("bookBtn1"),
                GetChildButton("bookBtn2")
            };
            mindBookMasks = new List <Image>()
            {
                GetChildImage("mindBookMask0"),
                GetChildImage("mindBookMask1"),
                GetChildImage("mindBookMask2")
            };
            for (int i = 0; i < bookBtns.Count; i++)
            {
                EventTriggerListener.Get(bookBtns[i].gameObject).onClick += onClick;
            }
        }
Exemplo n.º 20
0
 // Use this for initialization
 void Start()
 {
     EventTriggerListener.Get(Btn.gameObject).onClick        = onClick;
     EventTriggerListener.Get(ViewBtn.gameObject).onClick    = onClick;
     EventTriggerListener.Get(TakeOffBtn.gameObject).onClick = onClick;
 }
Exemplo n.º 21
0
 // Use this for initialization
 void Start()
 {
     EventTriggerListener.Get(EnterBtn.gameObject).onClick  = onClick;
     EventTriggerListener.Get(DeleteBtn.gameObject).onClick = onClick;
     EventTriggerListener.Get(CreateBtn.gameObject).onClick = onClick;
 }
Exemplo n.º 22
0
 void Start() {
     EventTriggerListener.Get(StudyBtn.gameObject).onClick = onClick;
     EventTriggerListener.Get(ForgetBtn.gameObject).onClick = onClick;
     EventTriggerListener.Get(MixBtn.gameObject).onClick = onClick;
 }