Пример #1
0
    // create customer setting information
    public void CreateGameInformation()
    {
        // allocate probability
        switch (manager.GamePlayer.StoreData.StoreStep)
        {
        case 1:
            probabilityOfBuyScale = probabilityOfFavoriteGroup = 100;
            break;

        case 2:
            probabilityOfBuyScale = probabilityOfFavoriteGroup = 90;
            break;

        case 3:
            probabilityOfBuyScale = probabilityOfFavoriteGroup = 80;
            break;
        }

        // allocate data
        buyScale      = CustomerAgent.ReturnBuyScale(UnityEngine.Random.Range(1, 6));
        favoriteGroup = ItemData.ReturnType(UnityEngine.Random.Range(1, 8));

        // set sell furiture object set
        sellFurnitureSet = new List <FurnitureObject>( );
        for (int i = 0; i < manager.GamePlayer.AllocateFurnitureObjectSet.Count; i++)
        {
            if (manager.GamePlayer.AllocateFurnitureObjectSet[i].InstanceData.Furniture.Function == FurnitureData.FunctionType.SellObject)
            {
                sellFurnitureSet.Add(manager.GamePlayer.AllocateFurnitureObjectSet[i]);
            }
        }

        // set stage time
        stageTime = manager.GamePlayer.StoreData.StageTime;

        // set customer cycle
        customerCycle = 3f;
    }
Пример #2
0
    // set favorite group & buy scale
    public void SetBuyInformation()
    {
        // buy scale
        if (UnityEngine.Random.Range(1, 101) >= stageManager.ProScale)
        {
            buyScale = stageManager.BuyScale;
        }
        else
        {
            int i = ( int )stageManager.BuyScale;
            while (i != ( int )stageManager.BuyScale)
            {
                i = UnityEngine.Random.Range(1, 6);
            }
            buyScale = CustomerAgent.ReturnBuyScale(i);
        }

        // favorite group
        if (UnityEngine.Random.Range(1, 101) >= stageManager.ProFavor)
        {
            favoriteItemType = stageManager.FavoriteGroup;
        }
        else
        {
            int i = ( int )stageManager.FavoriteGroup;
            while (i != ( int )stageManager.FavoriteGroup)
            {
                i = UnityEngine.Random.Range(1, 8);
            }
            favoriteItemType = ItemData.ReturnType(i);
        }

        calculatedBuyScale = BuyScaleSetFloatType(buyScale);

        storeDoor  = GameObject.Find("StoreDoor").transform;
        moveTarget = storeEnterPoint;
    }