// 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() { 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>()); } }
// 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 = 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; }
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; }