Ejemplo n.º 1
0
    // Use this for initialization

    void Start()
    {
        startPosZ = transform.localPosition.z;
        posZ      = startPosZ;
        // Debug.Log(startPosZ);
        pourState  = PourState.Not_pouring;
        cocktail   = GetComponentInParent <Cocktail>();
        startPos   = transform.localPosition;
        startScale = transform.localScale;
        drinkZ     = transform.localScale.z;
        startScale = new Vector3(startScale.x, startScale.y, drinkZ);
        myMesh     = GetComponent <MeshRenderer>();
    }
Ejemplo n.º 2
0
    public void FillUpWithBase(Ingredients.BaseType _baseType)
    {
        pourState = PourState.Pouring_Base;
        // scale += scaleGrowthRate * Time.deltaTime;
        // Debug.Log("Filling up drink with base!");
        myBaseType = _baseType;
        switch (_baseType)
        {
        case Ingredients.BaseType.GIN:
            myMesh.material.color = Color.white;
            //  Debug.Log("Pouring gin!");
            break;

        case Ingredients.BaseType.WHISKY:
            myMesh.material.color = Color.yellow;
            //  Debug.Log("Pouring whisky!");
            break;

        case Ingredients.BaseType.RUM:
            myMesh.material.color = Color.red;
            //  Debug.Log("Pouring rum!");
            break;

        default:
            break;
        }

        if (drinkZ < maxDrinkZ)
        {
            FillUp();
            cocktail.AddBase(_baseType);
        }
        else if (drinkZ >= maxDrinkZ)
        {
            Debug.Log("Drink is full!");
        }
    }
Ejemplo n.º 3
0
    public void FillUpWithMixer(Ingredients.MixerType _mixerType)
    {
        pourState   = PourState.Pouring_Mixer;
        myMixerType = _mixerType;
        Debug.Log("Filling up drink with mixer!");
        switch (_mixerType)
        {
        case Ingredients.MixerType.SODA:
            myMesh.material.color = Color.red;
            Debug.Log("pouring soda!");
            break;

        case Ingredients.MixerType.JUICE:
            myMesh.material.color = Color.yellow;
            Debug.Log("pouring juice!");
            break;

        case Ingredients.MixerType.TONIC_WATER:
            myMesh.material.color = Color.blue;
            Debug.Log("pouring tonic water!");
            break;

        default:
            break;
        }
        // scale += scaleGrowthRate * Time.deltaTime;
        // FillUp();
        if (drinkZ < maxDrinkZ)
        {
            FillUp();
            cocktail.AddMixer(_mixerType);
        }
        else if (drinkZ >= maxDrinkZ)
        {
            Debug.Log("Drink is full!");
        }
    }
Ejemplo n.º 4
0
 public void StopFillingUp()
 {
     pourState = PourState.Not_pouring;
 }