示例#1
0
    public void Attempt()
    {
        Executer.GetInstance().AddJob(() =>
        {
            ParticleSystem system = null;
            system = rightNebulaSpawner.GetComponentInChildren <ParticleSystem>();
            if (system != null)
            {
                Destroy(system.gameObject);
            }

            system = leftNebulaSpawner.GetComponentInChildren <ParticleSystem>();
            if (system != null)
            {
                Destroy(system.gameObject);
            }

            system = topNebulaSpawner.GetComponentInChildren <ParticleSystem>();
            if (system != null)
            {
                Destroy(system.gameObject);
            }

            system = bottomNebulaSpawner.GetComponentInChildren <ParticleSystem>();
            if (system != null)
            {
                Destroy(system.gameObject);
            }

            gameObject.GetComponent <SphereCollider>().enabled = true;
            aspect.GetComponent <MeshRenderer>().enabled       = true;
            transform.position = new Vector3(0f, 0f, 0f);
        });
        StartCoroutine(UpdateTimeDistortion());
        isDead     = false;
        resilience = initialResilience / 2f;
        hudManagerInstance.UpdatePlayerHealthUI(resilience, initialResilience);
        movementManager.EnableMovement();
    }