Example #1
0
    /// <summary>
    /// Spawn a list item to the item container
    /// </summary>
    /// <param name="location"><see cref="Location"/> that this item represents</param>
    /// <param name="completed">State of completion</param>
    public void SpawnLocationPrefab(Location location, bool completed)
    {
        //Instantiate a new list item to the container
        LocationlistItem item = Instantiate(_locationlistItem, _itemContainer.transform);

        //Set the item completion status based on the parameter
        if (completed)
        {
            item.SetItemContent(location, this, completedColor);
        }
        else
        {
            item.SetItemContent(location, this, defaultColor);
        }
    }
Example #2
0
    /// <summary>
    /// Spawn a disabled (inactive) item to the item contaniner
    /// Used earlier when all Locations did not have a Task
    /// </summary>
    /// <param name="location"><see cref="Location"/> that this item represents</param>
    public void SpawnDisabledLocationPrefab(Location location)
    {
        LocationlistItem item = Instantiate(_locationlistItem, _itemContainer.transform);

        item.SetItemContent(location, this, Color.gray);
    }