예제 #1
0
    private void OnPowerupCollision(GameObject obj)
    {
        string type = _spm.GetPowerupType(obj, false);

        AbilityRouter.RouteTag(type, CarProperties, gameObject, _spm, true, true);

        _spm.PowerUpPool.UnSpawnObject(obj);
    }
    public void LocalPowerUp(string tag, int triggeringServerId)
    {
        GamePowerUpManager gpm = _gameManager.PowerUpManager;

        AbilityRouter.RouteTag(tag, CarProperties, gameObject, gpm, triggeringServerId == ServerId, isLocalPlayer);
        if (PowerUpSound != null && triggeringServerId == ServerId)
        {
            PowerUpSound.PlayOneShot(PowerUpSound.clip);
        }
    }