Пример #1
0
    // プレイヤーが通った道をマップに表示
    public void PlayerPass(Trout2 trout)
    {
        if (trout.GetIsPass())
        {
            return;
        }
        string category = trout.GetCategory();

        if (category.Contains("ROAD"))
        {
            trout.PlayerPass();
        }
        if (category.Contains("ROOM"))
        {
            category = category.Replace("DOOR", "");
            category = category.Replace("CENTER", "");
            for (int i = 0; i < troutList.Count; i++)
            {
                if (troutList[i].GetCategory().Contains(category))
                {
                    troutList[i].PlayerPass();
                }
            }
            for (int i = 0; i < enemyList.Count; i++)
            {
                enemyList[i].MapEnemyActive(trout);
            }
        }
    }
Пример #2
0
    // 敵が移動できる範囲内にあるマスリスト
    public List <Vector3> GetEnemyAreaInTroutList(Trout2 trout)
    {
        List <Vector3> poslist  = new List <Vector3>();
        string         category = trout.GetCategory();

        category = category.Replace("DOOR", "");
        category = category.Replace("CENTER", "");
        for (int i = 0; i < troutList.Count; i++)
        {
            if (troutList[i].GetCategory().Contains(category))
            {
                poslist.Add(troutList[i].GetPosition());
            }
        }
        return(poslist);
    }