public static void CmdEjectSoul(CollectorDriver collector, int numberOfSoulsEjected) { collector.DropSoul(numberOfSoulsEjected); collector.MovementDriver.RecalculateSpeedBasedOnSoulConsumption(); collector.isDroppingSoul = true; //Triggers sound effect GameObject.FindGameObjectWithTag("GameController").SendMessage("SoulEjected",numberOfSoulsEjected); }
public static void DropSouls(CollectorDriver collectorDriver, int numSoulsToDrop) { delayInDroppingSoulsTimer -= Time.deltaTime; while (numSoulsToDrop > 0 && delayInDroppingSoulsTimer <= 0) { collectorDriver.DropSoul(1); delayInDroppingSoulsTimer = DELAY_IN_DROPPING_SOULS; numSoulsToDrop--; } }