コード例 #1
0
ファイル: ClothChanging.cs プロジェクト: sshuyii/subwayGame
    // Start is called before the first frame update
    void Start()
    {
        InventoryController   = GameObject.Find("---InventoryController");
        TouchController       = GameObject.Find("---TouchController").GetComponent <TouchController>();
        AllMachines           = GameObject.Find("---ClothInMachineController").GetComponent <AllMachines>();
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();



        CalculateInventory = InventoryController.GetComponent <CalculateInventory>();
        startPos           = transform.position;

        inventoryButtonList = new List <Button>();

//        selfButton.onClick.AddListener(AddClothToInventory);

        //currentSprite = GetComponent<SpriteRenderer>().sprite;

        myImage = GetComponent <Image>();

        startSprite = GetComponent <Image>().sprite;

        selfButton = GetComponent <Button>();


        for (var i = 0; i < CalculateInventory.inventory.Count; i++)
        {
            inventoryButtonList.Add(CalculateInventory.inventory[i].GetComponent <Button>());
        }
    }
コード例 #2
0
    void Start()
    {
        InventoryController   = GameObject.Find("---InventoryController");
        TouchController       = GameObject.Find("---TouchController").GetComponent <TouchController>();
        AllMachines           = GameObject.Find("---ClothInMachineController").GetComponent <AllMachines>();
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        LostAndFound          = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>();
        SpriteLoader          = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        AdsController         = GameObject.Find("---AdsController").GetComponent <AdsController>();
        InventorySlotMgt      = GameObject.Find("---InventoryController").GetComponent <InventorySlotMgt>();
        //AudioManager = GameObject.Find("---AudioManager").GetComponent<AudioManager>();
        LevelManager = FinalCameraController.LevelManager;
        startPos     = transform.position;



//        selfButton.onClick.AddListener(AddClothToInventory);

        //currentSprite = GetComponent<SpriteRenderer>().sprite;

        myImage = GetComponent <Image>();



        startSprite = GetComponent <Image>().sprite;


        if (!FinalCameraController.isTutorial)
        {
            returnConfirmButton.gameObject.SetActive(false);
        }
    }
コード例 #3
0
ファイル: ScreenshotHandler.cs プロジェクト: sshuyii/Karara
    void Start()
    {
        //height = width;
        instance = this;
        //myCamera = gameObject.GetComponent<Camera>();
        shutterSound = GetComponent <AudioSource>();

        AudioManager          = GameObject.Find("---AudioManager").GetComponent <AudioManager>();
        ScreenCapDirectory    = Application.persistentDataPath;
        FinalCameraController = GetComponent <FinalCameraController>();
        //CalculateInventory = GameObject.Find("---InventoryController").GetComponent<CalculateInventory>();
        RatingSys = GameObject.Find("FloatingUI").GetComponent <RatingSystem>();

        if (FinalCameraController != null)
        {
            AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>();
        }


        //        postImage = GetComponent<Image>();
        //        //print(postImage.name);

        if (!FinalCameraController.isTutorial)
        {
            //KararaTop = KararaTopImage.sprite.name;
            //KararaBottom = KararaBottomImage.sprite.name;
            //KararaShoe = KararaShoeImage.sprite.name;
        }
    }
コード例 #4
0
ファイル: ClothToMachine.cs プロジェクト: sshuyii/subwayGame
    // 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>());
        }
    }
コード例 #5
0
ファイル: StationForButton.cs プロジェクト: sshuyii/Karara
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        LevelManager          = FinalCameraController.LevelManager;
        SpriteLoader          = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();



        NPCNames.Add("???");
        Sprite defaultProfile = Resources.Load <Sprite>("Images/NPC/X/Profile/DefaultProfile");

        NPCAvatars.Add(defaultProfile);


        foreach (KeyValuePair <string, NPC> nameNPCPair in SpriteLoader.NPCDic)
        {
            //if (nameNPCPair.Key == "X"|| nameNPCPair.Key == "Karara") continue;
            if (nameNPCPair.Key == "Karara")
            {
                continue;
            }
            NPCNames.Add(nameNPCPair.Key);
            NPCAvatars.Add(nameNPCPair.Value.profile);
            Debug.Log("station for buttons" + nameNPCPair.Key);
            bagLogoInCollection.Add(nameNPCPair.Key, nameNPCPair.Value.bagLogo);
        }


        //三个站 每站4个tab

        matchedNPCIdx.Add(new List <int> {
            0, 0, 0, 0
        });
        matchedNPCIdx.Add(new List <int> {
            0, 0, 0, 0
        });
        matchedNPCIdx.Add(new List <int> {
            0, 0, 0, 0
        });

        // station buttons don't need tab num
        InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>();
        BagsController      = GameObject.Find("---BagsController").GetComponent <BagsController>();

        for (int i = 0; i < NPCNames.Count; i++)
        {
            ProfileUsageState.Add("");
        }

        displayingBag     = false;
        displayingProfile = false;
        exiting           = false;


        UpdateCollectionUI();
    }
コード例 #6
0
    // Start is called before the first frame updateGroup
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        InstagramController   = GameObject.Find("---InstagramController").GetComponent <InstagramController>();

        myImage = GetComponent <Image>();

        mySprite = GetComponent <Image>().sprite;
    }
コード例 #7
0
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SpriteLoader          = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        LevelManager          = FinalCameraController.LevelManager;

        //StreamWriter writer = new StreamWriter("./file2.txt");
        //StreamReader reader = new System.IO.StreamReader("./file2.txt");

        StringReader reader = null;
        TextAsset    file   = (TextAsset)Resources.Load("AdAttributes", typeof(TextAsset));

        reader = new StringReader(file.text);


        object[] loadedPics = Resources.LoadAll(AdsPath, typeof(Sprite));
        for (int i = 0; i < loadedPics.Length; i++)
        {
            Sprite newPic = (Sprite)loadedPics[i];
            backgrounds.Add(newPic.name);
            string atbs = "a 1 1 1 1";
            atbs = reader.ReadLine();
            if (atbs == null)
            {
                atbs = "a 1 1 1 1";
            }
            Ad newAd = new Ad(newPic.name, newPic, atbs);
            AdsDic.Add(newPic.name, newAd);
            AdsWaitinglist.Enqueue(newAd);
        }


        //Start from one post

        for (int i = 0; i < nextAdIdx; i++)
        {
            AdsWaitinglist.Dequeue();
            adsShown++;
        }



        //writer.Close();
        loadedPics = Resources.LoadAll(PosePath, typeof(Sprite));
        for (int i = 0; i < loadedPics.Length; i++)
        {
            poses.Add((Sprite)loadedPics[i]);
        }


        wearingClothes[3] = SpriteLoader.defaultClothes[3];
        wearingClothes[2] = SpriteLoader.defaultClothes[2];


        S2UpperBound = S1UpperBound + S2UpperBound;
    }
コード例 #8
0
ファイル: DoInventory.cs プロジェクト: sshuyii/subwayGame
    // Start is called before the first frame update
    void Start()
    {
        InventoryController = GameObject.Find("---InventoryController");
        CalculateInventory  = InventoryController.GetComponent <CalculateInventory>();

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


//        selfButton.onClick.AddListener(AddClothToInventory);
    }
コード例 #9
0
    void Start()
    {
        InstagramController   = GameObject.Find("---InstagramController").GetComponent <InstagramController>();
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();


        if (!FinalCameraController.isTutorial)
        {
            for (int i = 0; i < allClothList.Count; i++)
            {
                allCloth.Add(allClothList[i].name, allClothList[i]);
            }

            for (int i = 0; i < allClothUIList.Count; i++)
            {
                allClothUI.Add(allClothUIList[i].name, allClothUIList[i]);
            }

            for (int i = 0; i < allSubwayClothList.Count; i++)
            {
                allSubwayCloth.Add(allSubwayClothList[i].name, allSubwayClothList[i]);
                print(allSubwayClothList[i].name);
            }


            for (int i = 0; i < inventory.Count; i++)
            {
                //inventory used to be buttons
                inventorySprite.Add(inventory[i].GetComponent <Button>().image.sprite);

                //inventorySprite.Add(inventory[i].GetComponent<SpriteRenderer>().sprite);
            }

            for (int i = 0; i < ClothPos1.Count; i++)
            {
                AllClothPos0.Add(ClothPos0[i].name, ClothPos0[i]);
                AllClothPos1.Add(ClothPos1[i].name, ClothPos1[i]);
                AllClothPos2.Add(ClothPos2[i].name, ClothPos2[i]);
                AllClothPos3.Add(ClothPos3[i].name, ClothPos3[i]);

                allAdCloth.Add(ClothPos0[i].name, ClothPos0[i]);
            }

            postureDictionaryList.Add(AllClothPos0);
            postureDictionaryList.Add(AllClothPos1);
            postureDictionaryList.Add(AllClothPos2);
            postureDictionaryList.Add(AllClothPos3);



            allAdCloth = postureDictionaryList[posNum];
        }
    }
コード例 #10
0
ファイル: DoInventory.cs プロジェクト: sshuyii/Karara
    void Start()
    {
        InventoryController = GameObject.Find("---InventoryController");
        InventorySlotMgt    = InventoryController.GetComponent <InventorySlotMgt>();

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

        washerNum = GetComponentInParent <WasherController>().number;

//        selfButton.onClick.AddListener(AddClothToInventory);
    }
コード例 #11
0
    // Start is called before the first frame update
    void Start()
    {
        clothNum       = buttons.Length;
        myMachineState = AllMachines.MachineState.empty;

        myAnimator = GetComponentInChildren <Animator>();

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

        washingSound = AllMachines.gameObject.GetComponent <AudioSource>();

        Hide(Occupied);
    }
コード例 #12
0
ファイル: BagsController.cs プロジェクト: sshuyii/Karara
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        LevelManager          = GameObject.Find("---LevelManager").GetComponent <LevelManager>();
        ValueEditor           = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>();
        washers = FinalCameraController.AllMachines;

        stationBagOwners.Add(new List <string>());
        stationBagOwners.Add(new List <string>());
        stationBagOwners.Add(new List <string>());


        timeUpBagNum     = 0;
        unfinishedBagNum = 0;
    }
コード例 #13
0
    //public Dictionary<string, Sprite> allSubAd = new Dictionary<string, Sprite>();



    // Start is called before the first frame update
    void Start()
    {
//        for (int i = 0; i < subwayAdList.Count; i++)
//        {
//            allSubAd.Add(subwayAdList[i].name, subwayAdList[i]);
//        }

        InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>();

        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        if (FinalCameraController.isTutorial)
        {
            TutorialManager = GameObject.Find("---TutorialManager").GetComponent <TutorialManager>();
        }
        myButton = GetComponent <Button>();
    }
コード例 #14
0
ファイル: InstagramController.cs プロジェクト: sshuyii/Karara
    void Start()
    {
        //get the tutorial post into postList
        firstPost = postParent.transform.GetChild(0).gameObject;



        redDot.SetActive(false);
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SpriteLoader          = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        AdsController         = GameObject.Find("---AdsController").GetComponent <AdsController>();
        AudioManager          = GameObject.Find("---AudioManager").GetComponent <AudioManager>();
        LevelManager          = GameObject.Find("---LevelManager").GetComponent <LevelManager>();

        PosturePostImageList = originalPosture.GetComponentsInChildren <SpriteRenderer>();
    }
コード例 #15
0
    void Start()
    {
        myInputState          = InputState.None;
        dragDistance          = Screen.height * 8 / 100;
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        if (FinalCameraController != null)
        {
            LostAndFound  = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>();
            AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>();
            AudioManager  = GameObject.Find("---AudioManager").GetComponent <AudioManager>();
        }


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


        // washerController = GameObject.Find("").GetComponent<WasherController>();
    }
コード例 #16
0
    void Start()
    {
        // positions = new Vector3[4];
        // TouchController =  GameObject.Find("---TouchController").GetComponent<TouchController>();
        FinalCameraController    = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        TutorialCameraController = GameObject.Find("Main Camera").GetComponent <TutorialCameraController>();

        if (FinalCameraController == null)
        {
            currentPage = 4;
        }
        else
        {
            currentPage = 1;
        }
        smoothSpeed = 10f;

        pageDist = Mathf.Abs(positions[0].x - positions[1].x);
    }
コード例 #17
0
ファイル: LevelManager.cs プロジェクト: sshuyii/subwayGame
    // Start is called before the first frame update
    void Start()
    {
        Resources.UnloadUnusedAssets();

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

//        instructionText = InstructionBubble.GetComponentInChildren<TextMeshProUGUI>();
        hintArrowCG = hintArrow.GetComponent <CanvasGroup>();

        PathFollower = car.GetComponent <PathFollower>();
        carCG        = car.GetComponent <CanvasGroup>();

        if (skip)
        {
            GameObject.Find("Main Camera").transform.position = new Vector3(0, 0, -20);
            clicktime = 7;
            //Instructions.SetActive(false);
            Show(subwayCG);
            Hide(instructionCG);
            Hide(FinalCameraController.SubwayMap);
            bagIn.SetActive(false);
            Hide(chapterOne);
        }
        else
        {
            isInstruction = true;


            GameObject.Find("Main Camera").transform.position = new Vector3(0, 14, 20);
//            Show(startScreen);
            Show(instructionCG);
            Instructions.SetActive(true);
            bagIn.SetActive(false);
            Show(chapterOne);
            Show(arrowButton);
            Show(FinalCameraController.SubwayMap);
            Hide(GoBackSubway);
            Hide(subwayCG);
            FinalCameraController.myCameraState = FinalCameraController.CameraState.Map;
            StartCoroutine(StartChapterOne());//start map tutorial directly
        }
    }
コード例 #18
0
ファイル: ClothToMachine.cs プロジェクト: sshuyii/Karara
    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;


        AudioManager = GameObject.Find("---AudioManager").GetComponent <AudioManager>();

        ClothInMachineController = GameObject.Find("---ClothInMachineController");
        FinalCameraController    = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SubwayMovement           = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        cameraMovement           = GameObject.Find("Main Camera").GetComponent <CameraMovement>();
        RatingSys      = GameObject.Find("FloatingUI").GetComponent <RatingSystem>();
        SpriteLoader   = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>();
        ValueEditor    = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>();
        AllMachines    = ClothInMachineController.GetComponent <AllMachines>();

        myAnimator = this.transform.gameObject.GetComponent <Animator>();
        //todo: generate clothes
        //Debug.Log(this.transform.gameObject.tag);

        owner = SpriteLoader.NPCDic[this.transform.gameObject.tag];

        GenerateCloth();

        if (!FinalCameraController.AllStationClothList.ContainsKey(owner.name))
        {
            FinalCameraController.AllStationClothList.Add(owner.name, new List <Sprite>());
        }


        myImage.enabled = true;
        stage           = FinalCameraController.LevelManager.stage;
    }
コード例 #19
0
    void Start()
    {
        Resources.UnloadUnusedAssets();

        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        RatingSystem          = GameObject.Find("FloatingUI").GetComponent <RatingSystem>();
        FishBossNotification  = GameObject.Find("FishBossUI").GetComponent <FishBossNotification>();



        PathFollower = MapCar.GetComponent <PathFollower>();
        carCG        = MapCar.GetComponent <CanvasGroup>();

        int skipInstruction = PlayerPrefs.GetInt("skip", -1);

        if (skipInstruction == 1)
        {
            skip = true;
        }

        GameObject.Find("Main Camera").transform.position = new Vector3(0, 0, -20);

        if (!skip)
        {
        }
        else
        {
            //FinalCameraController.myCameraState = FinalCameraController.CameraState.Subway;
            //ShowRatingSys(false);
            //CloseInstruction();
            EndMapTutorial();
        }



        comicList.Add(new List <Sprite>());
        comicList[0].AddRange(comics1);
        comicList.Add(new List <Sprite>());
        comicList[1].AddRange(comics2);
    }
コード例 #20
0
    // Start is called before the first frame update
    void Start()
    {
        currentSprite = GetComponent <Image>().sprite;
        username      = GetComponentInChildren <Text>();

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


        myImage  = GetComponent <Image>();
        myButton = GetComponent <Button>();


        InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>();
        CalculateInventory  = GameObject.Find("---InventoryController").GetComponent <CalculateInventory>();

        if (GetComponent <RecordBackgroundPosture>() != null)
        {
            myBackgroundName = this.GetComponent <RecordBackgroundPosture>().backgroundName;
        }
    }
コード例 #21
0
    // Start is called before the first frame update
    void Start()
    {
        //get the tutorial post into postList
        postList.Add(postParent.transform.GetChild(0).gameObject);


        redDot.SetActive(false);
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();


        for (int i = 0; i < profileList.Count; i++)
        {
            allProfile.Add(profileList[i].name, profileList[i]);
        }

        for (int i = 0; i < backAdList.Count; i++)
        {
            allBackAd.Add(backAdList[i].name, backAdList[i]);
        }

        for (int i = 0; i < backAdList.Count; i++)
        {
            AdAlreadyTakenList.Add(backAdList[i].name, true);
        }

        PosturePostImageList = originalPosture.GetComponentsInChildren <Image>();

        for (int i = 0; i < backAdList.Count; i++)
        {
        }
        if (!FinalCameraController.isTutorial)
        {
            backgroundPoseDict.Add(backAdList[0].name, backgroundPose1);
            backgroundPoseDict.Add(backAdList[1].name, backgroundPose2);
            backgroundPoseDict.Add(backAdList[2].name, backgroundPose3);
            backgroundPoseDict.Add(backAdList[3].name, backgroundPose4);
        }
//        backgroundPoseDict.Add(backAdList[4].name, backgroundPose5);
    }
コード例 #22
0
ファイル: WasherController.cs プロジェクト: sshuyii/Karara
    // Start is called before the first frame update


    void Start()
    {
        clothNum       = buttons.Length;
        myMachineState = AllMachines.MachineState.empty;

        myAnimator = GetComponentInChildren <Animator>();

        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        SpriteLoader          = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>();
        AudioManager          = GameObject.Find("---AudioManager").GetComponent <AudioManager>();
        SubwayMovement        = GameObject.Find("---StationController").GetComponent <SubwayMovement>();
        ValueEditor           = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>();

        washingSound = AllMachines.gameObject.GetComponent <AudioSource>();

        TouchController = GameObject.Find("---TouchController").GetComponent <TouchController>();


        emptyImage = empty.GetComponent <SpriteRenderer>();
        fullImage  = full.GetComponent <SpriteRenderer>();
        DoorImage  = front.GetComponent <SpriteRenderer>();

        Light.sprite = statusEmpty;
    }
コード例 #23
0
    // Start is called before the first frame update
    void Start()
    {
        closetCG = closet.GetComponent <CanvasGroup>();
        Resources.UnloadUnusedAssets();
        audioClick     = GetComponent <AudioSource>();
        cameraMovement = GameObject.Find("Main Camera").GetComponent <CameraMovement>();

        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>();
    }
コード例 #24
0
 // Start is called before the first frame update
 void Start()
 {
     RatingSys             = GameObject.Find("FloatingUI").GetComponent <RatingSystem>();
     InstagramController   = GameObject.Find("---InstagramController").GetComponent <InstagramController>();
     FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
 }
コード例 #25
0
ファイル: SubwayMovement.cs プロジェクト: sshuyii/Karara
    // Start is called before the first frame update
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
        InstagramController   = GameObject.Find("---InstagramController").GetComponent <InstagramController>();
        BagsController        = GameObject.Find("---BagsController").GetComponent <BagsController>();
        AdsController         = GameObject.Find("---AdsController").GetComponent <AdsController>();
        AudioManager          = GameObject.Find("---AudioManager").GetComponent <AudioManager>();
        ValueEditor           = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>();


        if (!FinalCameraController.isTutorial)
        {
            LevelManager = FinalCameraController.LevelManager;

            bagPosAvailable.Add(false);
            bagPosAvailable.Add(false);
            bagPosAvailable.Add(false);

            noSameBag = true;

            aSR = arrow.GetComponent <SpriteRenderer>();
            hSR = highlight.GetComponent <SpriteRenderer>();

            //tabImg0 = GameObject.Find("bag0Logo").GetComponent<Image>();
            //tabImg1 = GameObject.Find("bag1Logo").GetComponent<Image>();
            LostAndFound = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>();

            //tab0 = GameObject.Find("bagTab0");
            //tab1 = GameObject.Find("bagTab1");
            collection.SetActive(false);
        }

        // 不知道 real timer干什么用的
        realTimer = (moveTime + stayTime + pauseTime) * 3 - timer;

        NameToStationBags.Add(bagStation0);
        NameToStationBags.Add(bagStation1);
        NameToStationBags.Add(bagStation2);


        AllDetailList.Add(detailList0);
        AllDetailList.Add(detailList1);

        DetailCG.Add(dSR1);
        DetailCG.Add(dSR2);

        currentStation = 0;

        stationTimer = stayTime;
//        CountDownTimer.text = "";

        if (!FinalCameraController.isTutorial)
        {
            //get all the doors position when game starts
            left1Pos  = left1.position.x;
            right1Pos = right1.position.x;
        }



        //get all station names into the dictionary
        for (var i = 0; i < stationNames.Count; ++i)
        {
            allStation.Add(stationNames[i], i);
        }


        //trainStop();
    }
コード例 #26
0
ファイル: SubwayMovement.cs プロジェクト: sshuyii/subwayGame
    // Start is called before the first frame update
    void Start()
    {
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();

        if (!FinalCameraController.isTutorial)
        {
            LevelManager = FinalCameraController.LevelManager;

            bagPosAvailable.Add(false);
            bagPosAvailable.Add(false);
            bagPosAvailable.Add(false);

            noSameBag = true;

            aSR = arrow.GetComponent <SpriteRenderer>();
            hSR = highlight.GetComponent <SpriteRenderer>();
        }

        realTimer = (moveTime + stayTime) * 3 - timer;

        NameToStationBags.Add("0", bagStation0);
        NameToStationBags.Add("1", bagStation1);
        NameToStationBags.Add("2", bagStation2);

        AllDetailList.Add(detailList0);
        AllDetailList.Add(detailList1);

        DetailCG.Add(dSR1);
        DetailCG.Add(dSR2);

        currentStation = 0;

        stationTimer = stayTime;
//        CountDownTimer.text = "";

        if (!FinalCameraController.isTutorial)
        {
            //get all the doors position when game starts
            left1Pos  = left1.anchoredPosition.x;
            right1Pos = right1.anchoredPosition.x;
//        left2Pos = left2.transform.position.x;
//        right2Pos = right2.transform.position.x;
        }

        //record individual station dic into the general list
//        allStationList.Add(Station0List);
//        allStationList.Add(Station1List);
//        allStationList.Add(Station2List);


        //get all station names into the dictionary
        for (var i = 0; i < stationNames.Count; ++i)
        {
            allStation.Add(stationNames[i], i);
        }

        //train stays at the first station for 30seconds
        //isMoving = false for 30 seconds, then isMoving = true for 60 seconds
//        InvokeRepeating("trainMove", stayTime, stayTime + moveTime);
//        InvokeRepeating("trainStop", stayTime + moveTime, stayTime + moveTime);

        //Invoke("trainMove", stayTime);
    }
コード例 #27
0
ファイル: TouchController.cs プロジェクト: sshuyii/subwayGame
// Start is called before the first frame update
    void Start()
    {
        myInputState          = InputState.None;
        dragDistance          = Screen.height * 8 / 100;
        FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>();
    }