private void Start()
    {
        if (currentFlips < flipCountActivate)
        {
            GetComponent <Transition>().enabled = false;
            GetComponent <Renderer>().enabled   = false;
        }

        player = Toolbox.Instance.GetPlayer();

        Material material = GetComponent <Renderer>().material;

        visibleInlaser = ShaderUtility.ShaderIsLaser(material);
    }
Beispiel #2
0
    public bool GetTransitioning()
    {
        if (!mRenderer)
        {
            return(false);
        }

        mRenderer.GetPropertyBlock(_propBlock);
        float currentTransitionState = _propBlock.GetFloat("_TransitionState");

        if (Toolbox.Instance.PlayerInReal() && ShaderUtility.ShaderIsReal(material) && (currentTransitionState < .001f) ||
            Toolbox.Instance.PlayerInLaser() && ShaderUtility.ShaderIsLaser(material) && (currentTransitionState > .999f) ||
            (!ShaderUtility.ShaderIsReal(material) && !ShaderUtility.ShaderIsLaser(material)))
        {
            return(false);
        }

        return(true);
    }