Ejemplo n.º 1
0
 public override void OnPlayerEnteredRoom(Player player)
 {
     base.OnPlayerEnteredRoom(player);
     DevelopmentHead.Track("network_is_master_client", PhotonNetwork.IsMasterClient);
     DevelopmentHead.Log($"network_head: a player with the actor id of {player.ActorNumber} joined the room", LogType.Log);
     DevelopmentHead.Track("network_room_population", PhotonNetwork.PlayerList.Length);
 }
Ejemplo n.º 2
0
 public override void OnJoinedRoom()
 {
     DevelopmentHead.Log("network_head: joined room", LogType.Log);
     DevelopmentHead.Track("network_room", PhotonNetwork.CurrentRoom.Name);
     DevelopmentHead.Track("network_actor_id", photonView.OwnerActorNr);
     DevelopmentHead.Track("network_room_population", PhotonNetwork.PlayerList.Length);
 }
Ejemplo n.º 3
0
    internal void EnterGameState(GameState gameState)
    {
        DevelopmentHead.Track($"game_state", gameState.ToString().ToLower());
        GameState previousGamestate = this.gameState;

        this.gameState = gameState;
        ManageStateChange(gameState, previousGamestate);
    }
Ejemplo n.º 4
0
    private void Start()
    {
        PhotonNetwork.AutomaticallySyncScene = true;

        DevelopmentHead.Track("network_status", "disconnected", Color.red);
        DevelopmentHead.Track("network_room", null);
        DevelopmentHead.Track("network_nickname", PhotonNetwork.LocalPlayer.NickName);
        DevelopmentHead.Track("network_actor_id", PhotonNetwork.LocalPlayer.UserId);
        DevelopmentHead.Track("network_server_address", null);
    }
Ejemplo n.º 5
0
 internal void Connect()
 {
     if (PhotonNetwork.IsConnected)
     {
         return;
     }
     PhotonNetwork.OfflineMode = false;
     DevelopmentHead.Track("network_status", "connecting", Color.yellow);
     PhotonNetwork.GameVersion = "X : 1.0.0";
     PhotonNetwork.ConnectUsingSettings();
 }
Ejemplo n.º 6
0
    private void Update()
    {
        if (user == null)
        {
            return;
        }

        DevelopmentHead.Track($"camera_position - {base.gameObject.name.ToLower()}", base.transform.position.ToString());
        DevelopmentHead.Track($"camera_mode", _mode.ToString().ToLower());

        Move(user.input.move);
        Look(user.input.look);

        ActionA();
        ActionB();
        ActionX();
        ActionMenu();
    }
Ejemplo n.º 7
0
 public override void OnDisconnected(DisconnectCause cause)
 {
     DevelopmentHead.Track("network_status", "disconnected", Color.red);
 }
Ejemplo n.º 8
0
 public override void OnConnectedToMaster()
 {
     DevelopmentHead.Track("network_status", "connected", Color.green);
     DevelopmentHead.Track("network_is_master_client", PhotonNetwork.IsMasterClient);
     DevelopmentHead.Track("network_server_address", PhotonNetwork.ServerAddress);
 }