Example #1
0
    // 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>());
        }
    }
Example #2
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>());
        }
    }
Example #3
0
    // 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);
    }
Example #4
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);
    }
Example #5
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;
        }
    }
Example #6
0
    void Start()
    {
        //height = width;
        instance = this;
        //myCamera = gameObject.GetComponent<Camera>();
        shutterSound = GetComponent <AudioSource>();


        ScreenCapDirectory    = Application.persistentDataPath;
        FinalCameraController = GetComponent <FinalCameraController>();
        CalculateInventory    = GameObject.Find("---InventoryController").GetComponent <CalculateInventory>();

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

        if (!FinalCameraController.isTutorial)
        {
            KararaTop    = KararaTopImage.sprite.name;
            KararaBottom = KararaBottomImage.sprite.name;
            KararaShoe   = KararaShoeImage.sprite.name;
        }
    }