Example #1
0
    public void onNextHat()
    {
        pvd.hatIndex++;
        if (pvd.hatIndex >= petFactory.hats.Length)
        {
            pvd.hatIndex = 0;
        }

        pvd.hatVariation = 0;

        hatPicker.transform.GetChild(1).GetComponent <Text>().text = (pvd.hatIndex + 1) + "/" + petFactory.hats.Length;
        hatPicker.transform.GetChild(6).GetComponent <Text>().text = (pvd.hatVariation + 1) + "/" + petFactory.hats[pvd.hatIndex].gameObjects.Length;

        GetComponent <AudioSource>().PlayOneShot(A_arrowClick);

        petFactory.buildPet(pvd);
    }
Example #2
0
    public void Start()
    {
        PetGlobal  pg;
        GameObject petKeeper = GameObject.FindGameObjectWithTag("PetKeeper");

        if (petKeeper == null)
        {
            pg  = new PetGlobal();
            pvd = pg.LoadVisuals();
        }
        else
        {
            pvd = PetKeeper.pet.LoadVisuals();
        }

        apparelUI.pvd = pvd;

        earPicker.transform.GetChild(1).GetComponent <Text>().text = (pvd.earsIndex + 1) + "/" + petFactory.ears.Length;

        eyePicker.transform.GetChild(3).GetComponent <Text>().text = (pvd.eyesIndex + 1) + "/" + petFactory.eyes.Length;
        eyePicker.transform.GetChild(7).GetComponent <Text>().text = (pvd.eyesSizeIndex + 1) + "/" + petFactory.eyes[pvd.eyesIndex].textures.Length;

        tailPicker.transform.GetChild(1).GetComponent <Text>().text     = (pvd.tailIndex + 1) + "/" + petFactory.tails.Length;
        whiskersPicker.transform.GetChild(1).GetComponent <Text>().text = (pvd.whiskersIndex + 1) + "/" + petFactory.whiskers.Length;
        nosePicker.transform.GetChild(1).GetComponent <Text>().text     = (pvd.noseIndex + 1) + "/" + petFactory.noses.Length;

        basePicker.transform.GetChild(2).GetComponent <Text>().text   = (pvd.baseTextureIndex + 1) + "/" + petFactory.baseTextures.Length;
        basePicker.transform.GetChild(5).GetComponent <Text>().text   = (pvd.baseTint + 1) + "/" + PetVisualData.palette.Length;
        basePicker.transform.GetChild(8).GetComponent <Image>().color = PetVisualData.palette[pvd.baseTint];

        overlayPicker.transform.GetChild(2).GetComponent <Text>().text   = (pvd.overlayBlendIndex + 1) + "/" + petFactory.overLayBlends.Length;
        overlayPicker.transform.GetChild(5).GetComponent <Text>().text   = (pvd.overlayTint + 1) + "/" + PetVisualData.palette.Length;
        overlayPicker.transform.GetChild(8).GetComponent <Image>().color = PetVisualData.palette[pvd.overlayTint];
        overlayPicker.transform.GetChild(10).GetComponent <Text>().text  = (pvd.overlayTextureIndex + 1) + "/" + petFactory.baseTextures.Length;

        detailsPicker.transform.GetChild(2).GetComponent <Text>().text   = (pvd.detailsBlendIndex + 1) + "/" + petFactory.detailsBlends.Length;
        detailsPicker.transform.GetChild(5).GetComponent <Text>().text   = (pvd.DetailsTint + 1) + "/" + PetVisualData.palette.Length;
        detailsPicker.transform.GetChild(8).GetComponent <Image>().color = PetVisualData.palette[pvd.DetailsTint];
        detailsPicker.transform.GetChild(9).GetComponent <Text>().text   = (pvd.detailsTextureIndex + 1) + "/" + petFactory.baseTextures.Length;

        stage = 0;

        petFactory.buildPet(pvd);
    }