Example #1
0
    protected override bool OnFinishWorking()
    {
        IceCreamMachine_Making icecream = coneInput.GetComponent <IceCreamMachine_Making>();

        icecream.setUnitProperty(icecream.ConeFlavor, icecream.IceCreamFlavor, true);
        icecream.isSprinkle = true;
        return(true);
    }
Example #2
0
    protected override bool OnFinishWorking()
    {
        Destroy(coneInput);
        spawnObject = Instantiate(IceCreamAndCone, spawnPoint, Quaternion.identity);
        IceCreamMachine_Making iceCreamMaking = spawnObject.GetComponent <IceCreamMachine_Making>();

        iceCreamMaking.setUnitProperty(ConeFlavor, iceCreamFlavor, false);
        iceCreamMaking.LastPosition = spawnPoint;
        return(true);
    }
Example #3
0
 private void OnTriggerStay(Collider other)
 {
     if (other.CompareTag("GameUnits"))
     {
         SweetUnits unit = other.GetComponent <SweetUnits>();
         if (unit.gameUnit == requireUnit)
         {
             IceCreamMachine_Making specialUnit = other.GetComponent <IceCreamMachine_Making>();
             if (specialUnit.ConeFlavor == ConeFlavor && specialUnit.IceCreamFlavor == IceCreamFlavor)
             {
                 unit.canPlace     = true;
                 unit.onMachine    = OnMachine.SpecialRequireBox;
                 unit.InRequireBox = gameObject;
             }
         }
         if (unit.gameUnit == GameUnits.CandyFloss)
         {
             unit.canPlace     = true;
             unit.onMachine    = OnMachine.SpecialRequireBox;
             unit.InRequireBox = gameObject;
         }
     }
 }