// Start is called before the first frame update void Start() { SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); AllMachines = GameObject.Find("---ClothInMachineController").GetComponent <AllMachines>(); car = GameObject.Find("SubwayMapCar"); PathFollower = car.GetComponent <PathFollower>(); //used when the timer is always on screen //zRotation = 360 / (SubwayMovement.stayTime + SubwayMovement.moveTime); myRectT = GetComponent <RectTransform>(); //SubwayMovement.Hide(bubble); myButton = GetComponent <Button>(); selfImage = GetComponent <Image>(); selfImage.enabled = false; if (!isFast && !SubwayMovement.pauseBeforeMove) { //now the timer is placed on the bag //zRotation = 360 / (3 *(SubwayMovement.stayTime + SubwayMovement.moveTime)); fillAmount = 1; selfImage.fillAmount = fillAmount; selfImage.enabled = true; } }
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); } }
// 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>()); } }
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(); }
// Use this for initialization private void Start() { // Set position of Enemy as position of the first waypoint myRT = GetComponent <RectTransform>(); myRT.anchoredPosition = waypoints[waypointIndex].anchoredPosition; SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); moveSpeed = distance / SubwayMovement.moveTime; currentEulerAngles = myRT.eulerAngles; }
// Start is called before the first frame update void Start() { startPoint = transform.position.x; SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); mySR = GetComponent <SpriteRenderer>(); myStartSprite = mySR.sprite; startSpeed = speed; transitionSpeed = stationSpeed / 3f; }
void Start() { myAnimator = GetComponent <Animator>(); myAnimation = GetComponent <Animation>(); float randomIdleStart; randomIdleStart = Random.Range(0, myAnimator.GetCurrentAnimatorStateInfo(0).length); //Set a random part of the animation to start from myAnimator.Play("HandleAnimation", 0, randomIdleStart); SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); TouchController = GameObject.Find("---TouchController").GetComponent <TouchController>(); }
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>(); }
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; }
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); }
// 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); }
// 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; }