예제 #1
0
 private void castHeal()
 {
     // TODO Visual fancy things to indicate fireball spell.
     foreach (CommandObjectController controller in magicControllers)
     {
         GameObject particles = Instantiate(damageParticleSystem, controller.transform.position, Quaternion.identity);
         DamageParticleController particleController = particles.GetComponent <DamageParticleController>();
         particleController.setColor(Color.green);
         particleController.destination = warriorHpBarObj.transform.position;
         controller.despawn();
     }
     healPlayer(40);
 }
예제 #2
0
    public void bombAttack(Vector3 origin, int amount)
    {
        // TODO Clear bullets around bomb.
        GameObject particles = Instantiate(damageParticleSystem, origin, Quaternion.identity);
        DamageParticleController particleController = particles.GetComponent <DamageParticleController>();

        particleController.setColor(Color.yellow);
        particleController.destination = bulletSpawnerObj.transform.position;
        particleController.travelTime  = 0.75f;
        explode(origin, Color.yellow);
        explode(origin, new Color(1f, 0.5f, 0f));
        damageBoss(amount);
    }
예제 #3
0
 private void castFireball()
 {
     // TODO Visual fancy things to indicate heal spell.
     foreach (CommandObjectController controller in magicControllers)
     {
         GameObject particles = Instantiate(damageParticleSystem, controller.transform.position, Quaternion.identity);
         DamageParticleController particleController = particles.GetComponent <DamageParticleController>();
         particleController.setColor(Color.red);
         particleController.destination = bulletSpawnerObj.transform.position;
         controller.despawn();
     }
     damageBoss(160);
 }
예제 #4
0
    private IEnumerator criticalAttack(Vector3 origin, Vector3 destination)
    {
        GameObject particles = Instantiate(damageParticleSystem, origin, Quaternion.identity);

        particles.transform.localScale = new Vector3(5f, 5f, 5f);
        DamageParticleController controller = particles.GetComponent <DamageParticleController>();

        controller.destination = bulletSpawnerObj.transform.position;
        controller.setColor(Color.red);
        yield return(new WaitForSeconds(0.1f));

        particles = Instantiate(damageParticleSystem, origin, Quaternion.identity);
        particles.transform.localScale = new Vector3(2f, 2f, 2f);
        controller             = particles.GetComponent <DamageParticleController>();
        controller.destination = bulletSpawnerObj.transform.position;
        controller.setColor(new Color(1f, 0.5f, 0f));
        yield return(new WaitForSeconds(0.1f));

        particles              = Instantiate(damageParticleSystem, origin, Quaternion.identity);
        controller             = particles.GetComponent <DamageParticleController>();
        controller.destination = bulletSpawnerObj.transform.position;
        controller.setColor(new Color(1f, 1f, 0f));
    }