示例#1
0
    void Die()
    {
        Time.timeScale      = 1;
        Time.fixedDeltaTime = regTime;
        for (int k = 0; k < childAlpha.Length; k++)
        {
            childAlpha[k].to       = 1;
            childAlpha[k].duration = 0;
        }

        Sprite1.SetActive(true);
        Sprite2.SetActive(true);
        checkPointReached = false;
        other.ReachCheckpoint(false);
        transform.position = new Vector3(cpm.Respawn(), transform.position.y, transform.position.z);
        other.gameObject.transform.position = new Vector3(cpm.Respawn(), other.gameObject.transform.position.y, transform.position.z);
        canDie       = true;
        other.canDie = true;
    }