Exemplo n.º 1
0
        public void DisplayGrid(bool displayed)
        {
            GameObject[] areas;
            areas = GameObject.FindGameObjectsWithTag("Area");

            foreach (GameObject g in areas)
            {
                AreaEditor ae = g.GetComponent <AreaEditor>();
                ae.showGrid = displayed;
            }
        }
Exemplo n.º 2
0
        // Use this for initialization
        private void Start()
        {
            // Search for player gameobject.
            target = GameObject.FindGameObjectWithTag("Player").transform;

            if (!target)
            {
                Debug.LogWarning("Boing is not present in the level !!! \nPlace it into an area in the \"Level/character\" section.");
                return;
            }

            m_OffsetZ = transform.position.z;

            // Recover current area.
            CurrentArea = target.transform.parent.parent.parent.GetComponent <AreaEditor>();
        }