Ejemplo n.º 1
0
        public static void InvokePlayerSpawn(CharacterClassManager ccm, RoleType role, ref Vector3 spawnPoint, ref float rotY)
        {
            PlayerSpawn playerSpawn = PlayerSpawnEvent;

            if (playerSpawn == null)
            {
                return;
            }
            PlayerSpawnEvent ev = new PlayerSpawnEvent
            {
                Player     = Player.GetPlayer(ccm.gameObject),
                Role       = role,
                Spawnpoint = spawnPoint,
                RotationY  = rotY
            };

            playerSpawn.Invoke(ev);
            spawnPoint = ev.Spawnpoint;
            rotY       = ev.RotationY;
        }
Ejemplo n.º 2
0
        //protected override void Start()
        //{

        //}

        public void OnPlayerSpawn()
        {
            PlayerSpawn?.Invoke();
        }