Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

check players if their name contains in ArrayList or not

$
0
0
Hello, I was trying to add Players in ArrayList to show them and hide other players.

Here is the code:

Code (CSharp):
  1. public ArrayList Partynames = new ArrayList();
  2. private bool inGroup = false;
  3.  
  4. private void FixedUpdate()
  5.     {
  6.        CheckMyPartyMembers();
  7.     }
  8.  
  9. if (Input.GetMouseButtonUp(0))
  10.   {
  11.       if (Partynames.Contains(this.playerName) == false)
  12.       {
  13.           Partynames.Add(this.playerName);
  14.           Debug.Log("added " + this.playerName);
  15.            inGroup = true;
  16.  
  17.        }...
check players if their name contains in ArrayList or not

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>