public void fillTheEngine(Florp other) { particle.Play(); //EndGameScore.instance.AddInsertedFlorp(insertedFlorps); //if (engine != null) { engine.InsertFlorp(); } BottleDispenser.instance.bottlesDispensed--; Destroy(other.gameObject); AudioEventManager.instance.PlaySound("reversesplat", .9f, 1, 0); isFilled++; }
private void OnTriggerEnter(Collider other) { if (interactedFlorp != null) { interactedFlorp = other.GetComponent <Florp>(); interactedFlorp.doFill = true; } if (other.GetComponent <Florp>() != null /*&& dump*/) { other.GetComponent <Florp>().doFill = true; other.GetComponent <Florp>().toolInteraction(); AudioEventManager.instance.PlaySound("splat", .7f, .8f, 0); DoDump(); } else { dump = false; } dump = false; }