private void Die(BaseFish BaseFish) { for (int i = 0; i < GFList.Count; i++) { if (GFList[i] == BaseFish) { GFList.Remove(GFList[i]); } } for (int i = 0; i < BFList.Count; i++) { if (BFList[i] == BaseFish) { BFList.Remove(BFList[i]); } } }
void SetDir(BaseFish fish) { var v = new Vector2(Random.value - 0.5f, Random.value - 0.5f); fish.CurrMoveDirection = v; }