Пример #1
0
    public ItemSubcategorySO GetSubcategorySO(ItemSubcategory enumId, out int index)
    {
        ItemSubcategorySO subcategorySO = null;

        index = -1;

        for (int i = 0; i < Database.Subcategories.Count; i++)
        {
            if (Database.Subcategories[i].EnumID == enumId)
            {
                subcategorySO = Database.Subcategories[i];
                index         = i;

                i = Database.Subcategories.Count; //end
            }
        }

        return(subcategorySO);
    }
Пример #2
0
    public void startInteraction(CharacterCustomizationScript customer, int ai)
    {
        playerGuy   = Instantiate(uiCharacter, playerLoc.transform);
        customerGuy = Instantiate(uiCharacter, customerLoc.transform);
        AInum       = ai;
        InteractionPanel.SetActive(true);

        Camera.main.GetComponent <CameraController> ().ChangeMode(CameraMode.Static);
        customerName = GameMaster.Instance.CustomerManager.GenerateCustomer().FullName();
        if (!EmptyItems())
        {
            customerItem = RandomItem();
        }
        customerSub = RandomSubCat();

        playerGuy.GetComponent <CharacterCustomizationScript>().SetAppearanceByData(customer.GetCustomizationData());
        customerGuy.GetComponent <CharacterCustomizationScript> ().SetAppearanceByData(GameMaster.Instance.CurrentPlayerObject.GetComponent <CharacterCustomizationScript> ().GetCustomizationData());

        //runSubInteraction(0);
        runInteraction(0);
    }