コード例 #1
0
 private void OnEnable()
 {
     if (_isTracked)
     {
         _tracker = FindObjectOfType <Tracker>();
         _tracker.AddToTrack(_maxSpawns);
     }
     _playArea = FindObjectOfType <PlayArea>();
 }
コード例 #2
0
        private void DrawRectangle(PlayArea playArea)
        {
            Vector3 pos = playArea.transform.position;

            Vector3[] verts = new Vector3[]
            {
                new Vector3(pos.x - playArea.Width, pos.y, pos.z - playArea.Length),
                new Vector3(pos.x - playArea.Width, pos.y, pos.z + playArea.Length),
                new Vector3(pos.x + playArea.Width, pos.y, pos.z + playArea.Length),
                new Vector3(pos.x + playArea.Width, pos.y, pos.z - playArea.Length)
            };

            Handles.DrawSolidRectangleWithOutline(verts, faceColor, outLineColor);
        }
コード例 #3
0
        void OnSceneGUI()
        {
            PlayArea playArea = target as PlayArea;

            DrawRectangle(playArea);
        }