Beispiel #1
0
    public void SetCurrentProtectionParameters(ProtectionParameters protectionParameters)
    {
        if (protectionParameters.GetProtectionDuration == 0)
        {
            return;
        }

        currentProtectionParameters = protectionParameters;
        currentProtectionParameters.StartProtection();

        if (currentProtectionParameters.GeneratesProtectionSphere)
        {
            ProtectionSphere newProtectionSphere = GameManager.gameManager.PoolManager.GetProtectionSphere(currentProtectionParameters.GetProtectionSphereType, PoolInteractionType.GetFromPool);
            newProtectionSphere.SetUpSphere(currentProtectionParameters.GetProtectionDuration, currentProtectionParameters.GetProtectionSphereRadius, transform, relatedShipHitbox.GetDamageTag);
        }
    }