Esempio n. 1
0
    protected override void Awake()
    {
        base.Awake();
        this._itemSize = this.itemPrototype.rect.height;

        timeline = GameObject.Find("Timeline").GetComponent <HorizontalScrollSnap>();
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        if (!isTutorial)
        {
            Hide(setting);
        }
//        myCameraState = CameraState.Subway;
        myAppState = AppState.Mainpage;

        myHSS               = GameObject.Find("Horizontal Scroll Snap").GetComponent <HorizontalScrollSnap>();
        subwayScrollRect    = GameObject.Find("Horizontal Scroll Snap").GetComponent <ScrollRect>();
        InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>();

        pageList.Add(RetroPage);
        pageList.Add(KararaPage);
        pageList.Add(DesignerPage);


        Hide(fishTalk);
        Hide(frontPage);
        Hide(postpage);
        HideAllPersonalPages();
        Hide(TakePhoto);
        Hide(Posture);



        fishTalkText = fishTalk.gameObject.GetComponentInChildren <TextMeshProUGUI>();
        //hide the UIs when click Karara
        Hide(clothCG);
        Hide(messageCG);
        Hide(Inventory);
    }
 void Start()
 {
     DeactivateAll();
     MenuObject = HorizontalScrollGO.GetComponent <HorizontalScrollSnap>();
     ShowHorizontalScrollSnap();
     CheckCurrentPage();
 }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        //find the horizontal scroll snap script
        myHSS = GameObject.Find("Horizontal Scroll Snap").GetComponent <HorizontalScrollSnap>();

        myAudio = GetComponent <AudioSource>();

        myImage = GetComponent <Image>();
//        secondImage = GetComponentInChildren<Image>();
        hitTime = 0;

        ClothInMachineController = GameObject.Find("---ClothInMachineController");
        FinalCameraController    = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        CalculateInventory       = GameObject.Find("---InventoryController").GetComponent <CalculateInventory>();
        SubwayMovement           = GameObject.Find("---StationController").GetComponent <SubwayMovement>();


        AllMachines          = ClothInMachineController.GetComponent <AllMachines>();
        WasherControllerList = new List <WasherController>();

        //get every machine's script
        for (int i = 0; i < AllMachines.WashingMachines.Count; i++)
        {
            WasherControllerList.Add(AllMachines.WashingMachines[i].GetComponent <WasherController>());
        }
    }
Esempio n. 5
0
    protected override void LateAwake()
    {
        base.LateAwake();

        //setup buttons
        characterUIButtons = transform.GetComponentsInChildren <CharacterUIButton>();
        scroller           = transform.GetComponentInChildren <HorizontalScrollSnap>();
    }
        void Awake()
        {
            scrollSnap = GetComponent <HorizontalScrollSnap>();
            scrollRect = GetComponent <ScrollRect>();

            scrollSnap.OnSelectionPageChangedEvent.AddListener(OnSelectionChanging);
            scrollSnap.OnSelectionChangeEndEvent.AddListener(OnSelectionChange);
        }
    // Use this for initialization
    void Start()
    {
        _scrollSnap = GameObjectHelper.GetChildComponentOnNamedGameObject <HorizontalScrollSnap>(gameObject, "ScrollView", true);
        _nextButton = GameObjectHelper.GetChildNamedGameObject(gameObject, "NextButton", true);

        container = gameObject;

        //

        AddBanner();

        GameManager.SafeAddListener <BannerLoadedMessage>(BannerLoadedHandler);
        GameManager.SafeAddListener <VideoAdShowingMessage>(VideoAdShowingHandler);

        StartCoroutine(CoRoutines.DelayedCallback(0.5f, BonusCoins));

        ((CustomGameManager)GameManager.Instance).ResetDefaultSound();

        if (!Debug.isDebugBuild)
        {
            FlurryIOS.LogPageView();
            FlurryAndroid.OnPageView();

            Fabric.Answers.Answers.LogContentView("Levels", "Screen");
        }

        _rankSignGameObject  = GameObjectHelper.GetChildNamedGameObject(packsContainer, "Sign", true);
        _rankSignText        = GameObjectHelper.GetChildComponentOnNamedGameObject <Text>(_rankSignGameObject, "RankName", true);
        _ranksVerticalScroll = GameObjectHelper.GetChildComponentOnNamedGameObject <CustomVerticalScrollSnap>(packsContainer, "ScrollView", true);

        PrepareRankForLevel(GameManager.Instance.Levels.Selected);

        _ranksVerticalScroll.StartingScreen = LevelController.Ranks().Items.Length - (_currentRank.Number - 1) - 1;

        if (PreferencesFactory.GetInt(Constants.KeyShowSelectedPack) > 0 &&
            GameManager.Instance.Levels.Selected != null)
        {
            PreferencesFactory.DeleteKey(Constants.KeyShowSelectedPack);

            GoToLevel(GameManager.Instance.Levels.Selected);
        }

#if !UNITY_EDITOR
        AdColonyManager.Instance.RequestAd(); // request ads to cache for CustomLevelButton.cs
#endif
    }
Esempio n. 8
0
 // Use this for initialization
 void Start()
 {
     scrollview = GetComponentInChildren <HorizontalScrollSnap>();
 }
Esempio n. 9
0
    // Start is called before the first frame update
    void Start()
    {
        closetCG = closet.GetComponent <CanvasGroup>();
        Resources.UnloadUnusedAssets();
        audioClick = GetComponent <AudioSource>();

        Hide(GestureCG);
        Hide(hintArrow.GetComponent <CanvasGroup>());

        fishColor = new Color(176f / 255f, 140f / 255f, 84f / 255f);

        myHSS = GameObject.Find("Horizontal Scroll Snap").GetComponent <HorizontalScrollSnap>();

        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();

        KararaStandingImage = KararaStanding.GetComponent <Image>();

        KararaSittingCanvasGroup = KararaSitting.GetComponent <CanvasGroup>();
        kararaDialogueRT         = KararaDialogueBubble.GetComponent <RectTransform>();
        KararaWorkCloth          = KararaStandingImage.sprite;
        startPosition            = kararaDialogueRT.anchoredPosition;

        StartCoroutine("TrainMoveIn");

        KararaRectT = KararaStanding.GetComponent <RectTransform>();

        DialogueImageList = DialogueBubble.GetComponentsInChildren <Image>();
        fishText          = DialogueBubble.GetComponentInChildren <TextMeshProUGUI>();

        KararaDialogueImageList = KararaDialogueBubble.GetComponentsInChildren <Image>();
        kararaText = KararaDialogueBubble.GetComponentInChildren <TextMeshProUGUI>();



        DialogueRT     = DialogueBubble.GetComponent <RectTransform>();
        lowerPosition  = DialogueRT.anchoredPosition - new Vector2(0, 200);
        higherPosition = DialogueRT.anchoredPosition;
        //disable the dialogues
        DoFishDialogue(false);


        //disable karara standing in the train
//        KararaStandingImage.enabled = false;
        KararaDisappear(false);

//        ClothUIButtons = ClothUI.GetComponentsInChildren<Button>();
//        ClothUIImages = ClothUI.GetComponentsInChildren<Image>();

        doorImage  = door.GetComponent <Image>();
        clothImage = cloth.GetComponent <Image>();

        ProfileImage.enabled = false;

        //disable scream
        screamImage.enabled = false;


        KararaAllImage = KararaSitting.gameObject.GetComponentsInChildren <Image>();

        //disable all shader effect
        //bag.GetComponent<Image>().material.EnableKeyword("SHAKEUV_OFF");
//        cloth.GetComponent<Image>().material.DisableKeyword("SHAKEUV_ON");
//        door.GetComponent<Image>().material.DisableKeyword("SHAKEUV_ON");

//        foreach (var button in ClothUIButtons)
//        {
//            button.GetComponent<Image>().material.DisableKeyword("SHAKEUV_ON");
//        }

        foreach (var image in KararaAllImage)
        {
            Material mat = image.material;
//            mat.DisableKeyword("SHAKEUV_ON");
//            mat.DisableKeyword("DOODLE_ON");
        }
        //disable map before it's in the tutorial
        SubwayMap.enabled = false;

        leftPosition = kararaDialogueRT.anchoredPosition;

        //set dialogue state
        tutorialDialogueState = DialogueState.none;

        DialogueBubbleAC = DialogueBubble.GetComponentInChildren <Animator>();

        hintArrowCG = hintArrow.GetComponent <CanvasGroup>();
    }
Esempio n. 10
0
 // Use this for initialization
 void Start()
 {
     scroller = transform.parent.GetComponentInChildren <HorizontalScrollSnap>();
     scroller.OnSelectionPageChangedEvent.AddListener(OnPageChange);
     scroller.OnSelectionChangeEndEvent.AddListener(OnPageChange);
 }