コード例 #1
0
    private void Light()
    {
        fogController.AddTorch(transform, radius);

        AudioManager.Play("dungeon_torch_lit");

        animator.animator.SetBool("isLit", true);
        smokeParticle.SetActive(true);

        if (deathParticle != null)
        {
            Debug.Log("making fwoosh");
            double     angle    = 90;
            Quaternion rot      = Quaternion.Euler(0, 0, (float)angle);
            GameObject particle = Instantiate(deathParticle, transform.position, rot, transform.parent);
            if (animator != null)
            {
                ParticleSystem.MainModule settings = particle.GetComponent <ParticleSystem>().main;
                settings.startColor = new ParticleSystem.MinMaxGradient(animator.deathParticlesColor);
            }
        }
    }