Example #1
0
        public void Start()
        {
            //Do to network latency, this start function will fire before this user has the correct name of this gameObject. Therefore,
            //This function was made public and the moment the name gets updated via the multi-purpose SendFloat4 function that is attached
            //to this player object upon its creation, calls this start function to ensure m_Instance is assigned properly.

            GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
            foreach (var player in players)
            {
                //If player name matches with our peer id, then set this manager to follow that player
                if (Regex.IsMatch(player.name, ASL.GameSparksManager.Instance().GetPlayerPeerId().ToString()))
                {
                    m_Instance = this;
                    break;
                }
            }
            mSpawnEggAt = Time.realtimeSinceStartup - kEggInterval; // assume one was shot
        }
Example #2
0
 public static void InitializeEggSystem(CSS385_Mp2_EggSpawnSystem e)
 {
     sEggSystem = e;
 }