Exemplo n.º 1
0
    public void ShareClothes()
    {
        enkidu.EquipPart(SlotCategory.Skirt, skirt);
        enkidu.SetPartColor(SlotCategory.Skirt, ColorCode.Color1, skirtColor);

        shamhat.EquipPart(SlotCategory.Skirt, skirt);
        shamhat.SetPartColor(SlotCategory.Skirt, ColorCode.Color1, skirtColor);

        flowchart.ExecuteBlock("Thank You");
    }
Exemplo n.º 2
0
    public void clothesGame()
    {
        gameObject.GetComponent <SpriteRenderer>().sprite = wearArea;
        clothes.SetActive(true);
        velocityY    = -3f;
        clothesPos.y = clothes.transform.position.y;
        clothes.GetComponent <Rigidbody2D>().velocity = new Vector2(velocityX, velocityY);

        if (Input.GetKeyDown(KeyCode.Space) && drinkIsInside == true)
        {
            clothesCounter++;
            clothesPos.y = initialPosClothes;
            clothes.transform.position = clothesPos;
            if (clothesCounter == 1)
            {
                enkidu.EquipPart(SlotCategory.Armor, "Fantasy 01 Male");
                enkidu.SetPartColor(SlotCategory.Armor, shirtColor1, shirtColor2, shirtColor2);
                clothes.GetComponent <SpriteRenderer>().sprite = pants;
            }
            else if (clothesCounter == 2)
            {
                flowchart.ExecuteBlock("Hurry");
                enkidu.EquipPart(SlotCategory.Skirt, "");
                enkidu.EquipPart(SlotCategory.Pants, "Fantasy 00 Male");
                enkidu.SetPartColor(SlotCategory.Pants, ColorCode.Color1, pantsColor);
                clothes.GetComponent <SpriteRenderer>().sprite = shoes;
            }
            else if (clothesCounter == 3)
            {
                enkidu.EquipPart(SlotCategory.Boots, "Fantasy 00");
                enkidu.SetPartColor(SlotCategory.Boots, ColorCode.Color1, bootsColor);
            }
        }
        else if (drinkIsInside == false && clothesPos.y < -1f)
        {
            clothesPos.y = initialPosClothes;
            clothes.transform.position = clothesPos;
        }
    }
Exemplo n.º 3
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Meet Trigger")
        {
            flowchart.ExecuteBlock("Meet Dialogue");
        }

        if (other.tag == "Axe")
        {
            Debug.Log("Its Triggering");
            enkidu.EquipPart(SlotCategory.OffHand, "Axe 01");
            enkidu.SetPartColor(SlotCategory.OffHand, weaponColor1, weaponColor2, weaponColor3);
            axe.SetActive(false);
        }
    }
Exemplo n.º 4
0
        /// <summary>
        /// Randomize desired color(s) of character's part(s)
        /// </summary>
        /// <param name="excludedCategory">(optional) Excluded SlotCategory</param>
        public void RandomizeColor(params SlotCategory[] excludedCategory)
        {
            List <SlotCategory> excludedcats = new List <SlotCategory>(excludedCategory);
            // Roll flashiness & variant
            int          flashiness = RollDice();
            int          variant    = RollDice();
            List <Color> colorpool  = new List <Color>();
            List <Color> colortheme = new List <Color>();
            List <Color> haircolor  = GetColors("Hair");
            List <Color> lipscolor  = GetColors("Lips");
            List <Color> tattcolor  = GetColors("Grayscale");
            List <Color> eyecolor   = GetColors("Eyes");

            colorpool.AddRange(GetColors("Bleak"));
            colorpool.AddRange(GetColors("Dark"));
            colorpool.AddRange(GetColors("Leather"));
            colorpool.AddRange(GetColors("Grayscale"));
            lipscolor.AddRange(GetColors("Skin"));
            tattcolor.AddRange(GetColors("Bleak"));
            tattcolor.AddRange(GetColors("Fabric"));
            tattcolor.AddRange(GetColors("Vibrant"));
            if (flashiness >= 20) // Bleak and dark
            {
                colorpool.AddRange(GetColors("Metal"));
                colorpool.AddRange(GetColors("Bleached"));
                haircolor.AddRange(GetColors("Metal"));
                haircolor.AddRange(GetColors("Eyes"));
                lipscolor.AddRange(GetColors("Bleached"));
            }
            if (flashiness >= 50) // Somewhat normal
            {
                colorpool.AddRange(GetColors("Fabric"));
                haircolor.AddRange(GetColors("Fabric"));
                haircolor.AddRange(GetColors("Vibrant"));
                lipscolor.AddRange(GetColors("Fabric"));
                lipscolor.AddRange(GetColors("Bleak"));
                lipscolor.AddRange(GetColors("Dark"));
            }
            if (flashiness >= 80) // Flashy af
            {
                colorpool.AddRange(GetColors("Vibrant"));
                haircolor.AddRange(GetColors("Bleached"));
                lipscolor.AddRange(GetColors("Vibrant"));
            }
            if (variant <= 30)
            {
                for (int i = 0; i < 6; i++)
                {
                    colortheme.Add(colorpool[Random.Range(0, colorpool.Count)]);
                }
            }
            else if (variant > 30 && variant < 80)
            {
                for (int i = 0; i < 9; i++)
                {
                    colortheme.Add(colorpool[Random.Range(0, colorpool.Count)]);
                }
            }
            else if (variant >= 80)
            {
                for (int i = 0; i < 12; i++)
                {
                    colortheme.Add(colorpool[Random.Range(0, colorpool.Count)]);
                }
            }
            if (RollDice() > 60)
            {
                eyecolor.AddRange(GetColors("Vibrant"));
            }
            // Set equipment colors
            if (!excludedcats.Contains(SlotCategory.Armor))
            {
                character.SetPartColor(SlotCategory.Armor, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Pants))
            {
                character.SetPartColor(SlotCategory.Pants, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Helmet))
            {
                character.SetPartColor(SlotCategory.Helmet, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Gloves))
            {
                character.SetPartColor(SlotCategory.Gloves, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Boots))
            {
                character.SetPartColor(SlotCategory.Boots, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Cape))
            {
                character.SetPartColor(SlotCategory.Cape, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.MainHand))
            {
                character.SetPartColor(SlotCategory.MainHand, colorpool[Random.Range(0, colorpool.Count)], colorpool[Random.Range(0, colorpool.Count)], colorpool[Random.Range(0, colorpool.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.OffHand))
            {
                character.SetPartColor(SlotCategory.OffHand, colorpool[Random.Range(0, colorpool.Count)], colorpool[Random.Range(0, colorpool.Count)], colorpool[Random.Range(0, colorpool.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Skirt))
            {
                character.SetPartColor(SlotCategory.Skirt, colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)], colortheme[Random.Range(0, colortheme.Count)]);
            }
            // Set face colors
            Color newcolor = haircolor[Random.Range(0, haircolor.Count)];

            if (!excludedcats.Contains(SlotCategory.Hair))
            {
                character.SetPartColor(SlotCategory.Hair, ColorCode.Color1, newcolor);
            }
            if (!excludedcats.Contains(SlotCategory.FacialHair))
            {
                character.SetPartColor(SlotCategory.FacialHair, ColorCode.Color1, newcolor);
            }
            if (!excludedcats.Contains(SlotCategory.Eyebrow))
            {
                if (flashiness < 80)
                {
                    character.SetPartColor(SlotCategory.Eyebrow, ColorCode.Color1, newcolor);
                }
                else
                {
                    character.SetPartColor(SlotCategory.Eyebrow, ColorCode.Color1, haircolor[Random.Range(0, haircolor.Count)]);
                }
            }
            if (!excludedcats.Contains(SlotCategory.Eyes))
            {
                character.SetPartColor(SlotCategory.Eyes, ColorCode.Color1, eyecolor[Random.Range(0, eyecolor.Count)]);
            }
            if (!excludedcats.Contains(SlotCategory.Mouth))
            {
                if (character.bodyType == BodyType.Female)
                {
                    character.SetPartColor(SlotCategory.Mouth, ColorCode.Color1, lipscolor[Random.Range(0, lipscolor.Count)]);
                }
                else
                {
                    character.SetPartColor(SlotCategory.Mouth, ColorCode.Color1, character.SkinColor);
                }
            }
            if (!excludedcats.Contains(SlotCategory.SkinDetails))
            {
                if (character.GetAssignedPart(SlotCategory.SkinDetails) != null)
                {
                    newcolor = tattcolor[Random.Range(0, tattcolor.Count)];
                    if (RollDice() > 50)
                    {
                        newcolor.a = Random.Range(0.2f, 1f);
                    }
                }
                else
                {
                    newcolor = Color.gray;
                }
                character.SetPartColor(SlotCategory.SkinDetails, ColorCode.Color1, newcolor);
            }
        }