示例#1
0
    public void IgniteFlammableStacks(GameObject damagingObject)
    {
        if (flammableCount > 0)
        {
            PlayerProperties.playerScript.dealTrueDamageToShip(Mathf.RoundToInt(flammableCount * 0.1f * PlayerProperties.playerScript.shipHealthMAX));
            GameObject explosionInstant = Instantiate(explosion, PlayerProperties.playerShipPosition, Quaternion.identity);
            explosionInstant.transform.localScale = Vector3.one * flammableCount * 4f / 5f;
            // need visuals here
            flammableCount = 0;

            foreach (GameObject artifact in PlayerProperties.playerArtifacts.activeArtifacts)
            {
                ArtifactEffect artifactEffect = artifact.GetComponent <ArtifactEffect>();
                if (artifactEffect != null)
                {
                    artifactEffect.ignitedPlayer();
                }
            }

            UpdateFireyBar();
            ParticleSystem.EmissionModule emissionModule = particleSystem.emission;
            emissionModule.rate = 0;
            ParticleSystem.MainModule mainModule = particleSystem.main;
            mainModule.startSizeMultiplier = 0;
            flammableStackUI.IgniteStacksIconsAnimation();
        }
    }
示例#2
0
    public static void addEnemy(Enemy enemy)
    {
        if (enemy != null)
        {
            enemyPool.Add(enemy);

            foreach (GameObject activeArtifact in PlayerProperties.playerArtifacts.activeArtifacts)
            {
                ArtifactEffect artifactEffect = activeArtifact.GetComponent <ArtifactEffect>();
                if (artifactEffect != null)
                {
                    artifactEffect.SpawnedEnemy(enemy);
                }
            }
        }
    }
示例#3
0
 public void removeArtifact()
 {
     if (displayInfo != null && inventory.itemList.Count < inventory.inventorySlots.Length && GameObject.Find("PlayerShip").GetComponent <PlayerScript>().enemiesDefeated == true && FindObjectOfType <ConsumableConfirm>() == null)
     {
         if (inventory.itemList.Count < inventory.inventorySize)
         {
             displayInfo.isEquipped = false;
             ArtifactEffect artifactEffect = displayInfo.GetComponent <ArtifactEffect>();
             if (artifactEffect != null)
             {
                 artifactEffect.artifactUnequipped();
             }
             artifacts.activeArtifacts.Remove(displayInfo.gameObject);
             inventory.itemList.Add(displayInfo.gameObject);
             inventory.UpdateUI();
             artifacts.UpdateUI();
             PlayerProperties.playerScript.CheckAndUpdateHealth();
         }
     }
 }
示例#4
0
    public void AddFlammableStack(GameObject damagingObject)
    {
        flammableCount++;
        flammableStackUI.UpdateFlammableIconStacks(flammableCount);
        UpdateFireyBar();
        ParticleSystem.EmissionModule emissionModule = particleSystem.emission;
        emissionModule.rate = 10 * flammableCount;
        ParticleSystem.MainModule mainModule = particleSystem.main;
        mainModule.startSizeMultiplier = flammableCount * 0.05f;

        foreach (GameObject artifact in PlayerProperties.playerArtifacts.activeArtifacts)
        {
            ArtifactEffect artifactEffect = artifact.GetComponent <ArtifactEffect>();
            if (artifactEffect != null)
            {
                artifactEffect.addedFlammableStack(flammableCount);
            }
        }

        if (flammableCount >= 5)
        {
            IgniteFlammableStacks(damagingObject);
        }
    }
示例#5
0
    public void healPlayer(int amountHealing)
    {
        if (amountHealing > 0)
        {
            healNumbers.showHealing(amountHealing, shipHealthMAX);
            shipHealth += amountHealing;

            if (shipHealth > shipHealthMAX)
            {
                shipHealth = shipHealthMAX;
            }
        }

        foreach (GameObject artifact in artifacts.activeArtifacts)
        {
            ArtifactEffect effect = artifact.GetComponent <ArtifactEffect>();
            if (effect != null)
            {
                effect.healed(amountHealing);
            }
        }

        updateHealthBar();
    }
示例#6
0
 private void Awake()
 {
     currentEffect = GetComponent <ArtifactEffect>();
 }
示例#7
0
 private void Start()
 {
     ArtifactEffect = GetComponent <ArtifactEffect>();
 }