Exemplo n.º 1
0
        public void RemoveUnit(GameData.Marker marker)
        {
            List <MarkerView> views = new List <MarkerView>(m_ResourceContainer.GetComponentsInChildren <MarkerView>());
            MarkerView        view  = views.Find((v) => v.marker == marker);

            Destroy(view.gameObject);
        }
Exemplo n.º 2
0
        public UnitView AddUnit(GameData.Marker marker, Color tint)
        {
            GameObject goUnit = CreateUnit("Resource/" + marker.markerType.ToString(), m_MarkerContainer, marker.id, new Vector2Int(marker.position.x, marker.position.y));
            MarkerView view   = goUnit.GetComponent <MarkerView>();

            view.Initialize(marker, tint);
            return(view);
        }