示例#1
0
    public void Interact(PlayerController playerController)
    {
        if (isActivated)
        {
            isActivated = false;
            mecanism.DeactivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.DeactivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.DeactivateMecanism();
            }
        }
        else if (!isActivated)
        {
            isActivated = true;
            mecanism.ActivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.ActivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.ActivateMecanism();
            }
        }
    }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        if ((other.tag == "Player" || other.tag == "DarkPlayer" || other.tag == "LightPlayer") && other.GetType() == typeof(BoxCollider))
        {
            mecanism.ActivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.ActivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.ActivateMecanism();
            }
        }
    }
示例#3
0
    public void Interact(PlayerController playerController)
    {
        if (isActivated)
        {
            isActivated = false;

            minuteurText.transform.parent.gameObject.SetActive(false);

            mecanism.DeactivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.DeactivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.DeactivateMecanism();
            }
        }
        else if (!isActivated)
        {
            isActivated = true;

            timeLeft = timer;

            minuteurText.transform.parent.gameObject.SetActive(true);

            mecanism.ActivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.ActivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.ActivateMecanism();
            }


            StartCoroutine(CountDown());
        }
    }
    public void Activate()
    {
        if (!isActivated)
        {
            Debug.Log("Activated");
            mecanism.ActivateMecanism();

            if (mecanism2 != null)
            {
                mecanism2.ActivateMecanism();
            }

            if (mecanism3 != null)
            {
                mecanism3.ActivateMecanism();
            }

            isActivated = true;
        }
    }