コード例 #1
0
 void UpdateSwitchColor()
 {
     buttonState = portalControl.GetActivePortal();
     portalSwitchSprite.SetSprite(buttonState);
 }
コード例 #2
0
    /*
     * private void OnTriggerEnter(Collider other)
     * {
     *      if (other.CompareTag("Player") && IsActive && other.GetComponent<PortalTimer>().IsTeleportable)
     *      {
     *              other.GetComponent<PlayerInput>().Teleport(destinationPortal);
     *              other.GetComponent<PortalTimer>().StartPortalTimer();
     *      }
     * }
     */

    public void UpdatePortal()
    {
        IsActive = (portalColor == portalControl.GetActivePortal());
    }