Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

PUN - Choose random Hero for player

$
0
0
So, the thing is: after a time, the players that don't choose a hero to play should receive a random hero. The heroes cannot be repeated. I use as exemple the DemoPickup and I created my on class:

Code (CSharp):
  1. usingSystem;
  2. using System;
  3.  using System.Collections.Generic;
  4.  using ExitGames.Client.Photon;
  5.  using UnityEngine;
  6.  using Hashtable = ExitGames.Client.Photon.Hashtable;
  7.  
  8.  public class HeroAssigns : MonoBehaviour
  9.  {
  10.      public enum Hero : byte
  11.      {
  12.          none,
  13.          Cube,...
PUN - Choose random Hero for player

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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