Beispiel #1
0
    public List <GameObject> GetStarList(Vector2Int cellNum, StarBase.StarType type)
    {
        if (!CheckLimitOfMap(cellNum))
        {
            return(new List <GameObject>());
        }
        else
        {
        }

        var list         = new List <GameObject>(GetStarList(cellNum));
        var removingList = list.FindAll(obj => obj.GetComponent <MyGameObject>().objectType != MyGameObject.ObjectType.Star);

        foreach (GameObject obj in removingList)
        {
            list.Remove(obj);
        }

        return(list.FindAll(obj => (obj.GetComponent <StarBase>().starType & type) != 0));
    }
Beispiel #2
0
    public List <GameObject> GetStarList(Vector2Int cellNum, StarBase.StarType type, Direction direction)
    {
        cellNum += GetDifferenceByDirection(direction);

        return(GetStarList(cellNum, type, direction));
    }
Beispiel #3
0
    public GameObject GetStar(Vector2Int cellNum, StarBase.StarType type, Direction direction)
    {
        cellNum += GetDifferenceByDirection(direction);

        return(GetStar(cellNum, type));
    }