Пример #1
0
        void OnTriggerEnter2D(Collider2D other)
        {
            if (ArcadePhysics.SameWorld(this, other))
            {
                if (enabled)                   // only trigger if this component is on

                {
                    if (started == false && recorder != null)
                    {
                        recorder.StartRecording();

                        started = true;
                    }
                }
            }
        }
Пример #2
0
        void OnTriggerEnter2D(Collider2D other)
        {
            if (ArcadePhysics.SameWorld(this, other))
            {
                // only trigger if this component is on
                if (enabled)
                {
                    if (ended == false && recorder != null)
                    {
                        recorder.EndRecording(clock.GetTime());

                        ended = true;
                    }
                }
            }
        }
Пример #3
0
        void OnTriggerEnter2D(Collider2D other)
        {
            if (ArcadePhysics.SameWorld(this, other))
            {
                // only trigger if this component is on
                if (enabled)
                {
                    if (ended == false && replayer != null)
                    {
                        replayer.EndReplaying();

                        ended = true;

                        // if this component is meant to end
                        // the level, end it

                        if (terminal)
                        {
                            SceneManager.ExitGameOnFinish();
                        }
                    }
                }
            }
        }