Ejemplo n.º 1
0
        static string AddLand(Addition addition)
        {
            string land = "";

            if (addition == Addition.of)
            {
                land = " of ";
            }
            else if (addition == Addition._for == true)
            {
                land = " for ";
            }
            else if (addition == Addition.either == true)
            {
                if (Random.Range(0, 100) < 50)
                {
                    land = " of ";
                }
                else
                {
                    land = " for ";
                }
            }

            land += LandName.Generate();

            return(land);
        }
Ejemplo n.º 2
0
        public override void Awake()
        {
            base.Awake();
            var t = controller.transform;

            controller.TextureCmps["BGTexture"].spriteName = "Copy_Drawing_Di1";
            Slider         = t.GetMonoILRComponent <LTSliderBtnList>("Edge/BottomRight/List");
            challengeEntry = t.GetMonoILRComponent <LTInstanceChallengeEntryCtrl>("Edge/ChallengeEntrance");

            controller.backButton = controller.UiButtons["BackButton"];
            controller.BindingBtnEvent(new List <string>()
            {
                "ChatButton", "FriendButton", "SwitchBtn"
            }, new List <EventDelegate>()
            {
                new EventDelegate(OnChatBtnClick), new EventDelegate(OnFriendBtnClick), new EventDelegate(() => OnSwitchBtnClick(t.GetComponent <Transform>("Edge/BottomRight/Btn")))
            });
            controller.BindingCoolTriggerEvent(new List <string>()
            {
                "MoveToLeft", "MoveToRight"
            }, new List <EventDelegate>()
            {
                new EventDelegate(MoveToLeftLand), new EventDelegate(MoveToRightLand)
            });
            ChapterObjInstance = controller.GObjects["ChapterObjInstance"];
            LandObjInstance    = controller.GObjects["LandObjInstance"];
            PoolTrans          = controller.Transforms["PoolTrans"];
            LandContainerTrans = controller.Transforms["LandContainerTrans"];
            LandName           = controller.UiLabels["LandName"];
            LandNameTween      = LandName.GetComponent <TweenPosition>();

            InitLand();
            InitChapter();

            Hotfix_LT.Messenger.AddListener <System.Action>(Hotfix_LT.EventName.PlayCloudFxEvent, PlayCloudFxFunc);
            curChapterID = null;
        }