void OnTriggerEnter(UnityEngine.Collider other)
    {
        // compare if the collider is the player via tag
        if (Globals.HR_Completed && other.CompareTag("Player") && loaded == false)
        {
            // it seems that specifying a string from within Unity
            // adds an extra character (Unicode 19) to one end of
            // the string. This is problematic, so we remove it.

            if (DestScene[0] < 32)
            {
                DestScene = DestScene.Substring(1);
            }
            else if (DestScene[DestScene.Length - 1] < 32)
            {
                DestScene = DestScene.Substring(0, DestScene.Length - 1);
            }

            loaded = true;

            // unfortunately, Unity does not raise an exception
            // if the scene can't be loaded; it just logs an error.
            // So, no error handling can be done (bleh).

            Globals.HR_TimingEnabled = false;
            Invoke("LoadScene", 1f);
            Animator.SetTrigger("start-fade-out");
        }
    }
예제 #2
0
    void Start()
    {
        Globals.HR_isGetMid = false;

        Globals.HR_TargetLower = (int)System.Math.Round(Globals.HR_TargetMiddle * (100f - TargetDifferencePercent) / 100);
        Globals.HR_TargetUpper = (int)System.Math.Round(Globals.HR_TargetMiddle * (100f + TargetDifferencePercent) / 100);

        Globals.HR_TargetDuration = TargetDuration;
        Globals.HR_Completed      = false;
        Globals.HR_isTiming       = false;
        Globals.HR_Timer          = 0;
        Animator.SetTrigger("start-fade-in");
        Invoke("EnableTiming", 1f);
    }
예제 #3
0
        static StackObject *SetTrigger_6(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @id = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Animator instance_of_this_method = (UnityEngine.Animator) typeof(UnityEngine.Animator).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetTrigger(@id);

            return(__ret);
        }
예제 #4
0
        static StackObject *SetTrigger_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @name = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Animator instance_of_this_method = (UnityEngine.Animator) typeof(UnityEngine.Animator).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetTrigger(@name);

            return(__ret);
        }
 void fadeout()
 {
     Animator.SetTrigger("start-fade-out");
 }