Ejemplo n.º 1
0
        protected override void OnSceneGUI()
        {
            base.OnSceneGUI();

            if (Event.current.type == EventType.Repaint)
            {
                if (EditorApplication.isPlaying)
                {
                    if (m_TimerTrigger.IsPlacedOnBrick())
                    {
                        var center = m_TimerTrigger.GetBrickCenter() + Vector3.up * 5.0f;
                        var ratio  = m_TimerTrigger.GetElapsedRatio();
                        Handles.color = Color.green;
                        Handles.DrawWireDisc(center, Camera.current.transform.forward, 0.5f);
                        Handles.DrawSolidArc(center, -Camera.current.transform.forward, Camera.current.transform.up, (1.0f - ratio) * 360.0f, 0.5f);
                    }
                }
            }
        }