public Vector2 GetCharacterPosition(CharacterID characterID) { Character find = null; if ((int)characterID / (int)CharacterID.CheckNumber == (int)CharacterID.PlayerSide) { find = playerSide.Find(c => c.GetCharacterID() == characterID); } else if ((int)characterID / (int)CharacterID.CheckNumber == (int)CharacterID.EnemySide) { find = enemySide.Find(c => c.GetCharacterID() == characterID); } if (find != null && !find.IsDead()) { return(find.GetPosition()); } return(new Vector2(float.MinValue, float.MinValue));//キャラクターがいないとき }
public bool IsCharacterDead(CharacterID characterID) { //キャラクターが見つからなければ死亡 Character find = null; if ((int)characterID / (int)CharacterID.CheckNumber == (int)CharacterID.PlayerSide) { find = playerSide.Find(c => c.GetCharacterID() == characterID); } else if ((int)characterID / (int)CharacterID.CheckNumber == (int)CharacterID.EnemySide) { find = enemySide.Find(c => c.GetCharacterID() == characterID); } if (find == null || find.IsDead()) { return(true); } return(false); }