public void OnEnable() { PhotonNetwork.AddCallbackTarget(this); DisableIfNotMine(); }
private void Awake() { PhotonNetwork.AddCallbackTarget(this); view = GetComponent <PhotonView>(); }
public override void OnEnable() { base.OnEnable(); // register to photn callback functions PhotonNetwork.AddCallbackTarget(this); }
public void Awake() { PhotonNetwork.AddCallbackTarget(this); PhotonNetwork.AutomaticallySyncScene = true; instance = this; }
private void Awake() { PhotonNetwork.AddCallbackTarget(this); }
public override void awake() { base.awake(); UITool.SetActionTrue(this.skin); PhotonNetwork.AddCallbackTarget(this); }
public override void OnEnable() { base.OnEnable(); PhotonNetwork.AddCallbackTarget(this); SceneManager.sceneLoaded += onSceneFinishedLoading; //setting up event listener for whenver we load a new scene. Whenever we call a new scene we call our onSceneFinishedLoading method. }
public override void OnServerStateEnter() { PhotonNetwork.AddCallbackTarget(this); responds = new bool[players.Count]; var playerNames = RongPlayerIndices.Select( playerIndex => CurrentRoundStatus.GetPlayerName(playerIndex) ).ToArray(); var handData = RongPlayerIndices.Select( playerIndex => CurrentRoundStatus.HandData(playerIndex) ).ToArray(); var richiStatus = RongPlayerIndices.Select( playerIndex => CurrentRoundStatus.RichiStatus(playerIndex) ).ToArray(); var multipliers = RongPlayerIndices.Select( playerIndex => gameSettings.GetMultiplier(CurrentRoundStatus.IsDealer(playerIndex), players.Count) ).ToArray(); var totalPoints = RongPointInfos.Select((info, i) => info.BasePoint * multipliers[i]).ToArray(); var netInfos = RongPointInfos.Select(info => new NetworkPointInfo { Fu = info.Fu, YakuValues = info.YakuList.ToArray(), Dora = info.Dora, UraDora = info.UraDora, RedDora = info.RedDora, BeiDora = info.BeiDora, IsQTJ = info.IsQTJ }).ToArray(); Debug.Log($"The following players are claiming rong: {string.Join(",", RongPlayerIndices)}, " + $"PlayerNames: {string.Join(",", playerNames)}"); var rongInfo = new EventMessages.RongInfo { RongPlayerIndices = RongPlayerIndices, RongPlayerNames = playerNames, HandData = handData, WinningTile = WinningTile, DoraIndicators = MahjongSet.DoraIndicators, UraDoraIndicators = MahjongSet.UraDoraIndicators, RongPlayerRichiStatus = richiStatus, RongPointInfos = netInfos, TotalPoints = totalPoints }; // send rpc calls ClientBehaviour.Instance.photonView.RPC("RpcRong", RpcTarget.AllBufferedViaServer, rongInfo); // get point transfers transfers = new List <PointTransfer>(); for (int i = 0; i < RongPlayerIndices.Length; i++) { var rongPlayerIndex = RongPlayerIndices[i]; var point = RongPointInfos[i]; var multiplier = multipliers[i]; int pointValue = point.BasePoint * multiplier; int extraPoints = i == 0 ? CurrentRoundStatus.ExtraPoints * (players.Count - 1) : 0; transfers.Add(new PointTransfer { From = CurrentPlayerIndex, To = rongPlayerIndex, Amount = pointValue + extraPoints }); } // richi-sticks-points transfers.Add(new PointTransfer { From = -1, To = RongPlayerIndices[0], Amount = CurrentRoundStatus.RichiSticksPoints }); next = !RongPlayerIndices.Contains(CurrentRoundStatus.OyaPlayerIndex); // determine server time out serverTimeOut = ServerMaxTimeOut * RongPointInfos.Length + ServerConstants.ServerTimeBuffer; firstTime = Time.time; }
/// <summary> /// The object has been enabled. /// </summary> protected override void OnEnable() { base.OnEnable(); PhotonNetwork.AddCallbackTarget(this); }
private void Start() { CreatePlayer(); PhotonNetwork.AddCallbackTarget(this); }
public override void OnEnable() { PhotonNetwork.AddCallbackTarget(this); PhotonNetwork.AutomaticallySyncScene = true; }
public ConnectionManager() { PhotonNetwork.AddCallbackTarget(this); }
public override void OnEnable() { SceneManager.sceneLoaded += OnSceneFinishedLoading; PhotonNetwork.AddCallbackTarget(this); }
public virtual void Initialize() { PhotonNetwork.AddCallbackTarget(this); }
/// <summary> /// OnEnable Unity function. Make sure to call base.OnEnable() if overriding /// </summary> protected virtual void OnEnable() => PhotonNetwork.AddCallbackTarget(this);
public virtual void OnEnable() { PhotonNetwork.AddCallbackTarget(this); }
private void Start() { PhotonNetwork.AddCallbackTarget(this); }
public override void OnDisable() { base.OnEnable(); PhotonNetwork.AddCallbackTarget(this); SceneManager.sceneLoaded -= OnSceneFinishedLoading; }
private void OnEnable() { PhotonNetwork.AddCallbackTarget(this); StartCoroutine(AddPlayerDeathListener()); }
public override void OnEnable() { //Register to photon callbacks PhotonNetwork.AddCallbackTarget(this); }
private int multiplayerSceneIndex; // num for build index to scene public override void OnEnable() // trigerred on LobbyController { PhotonNetwork.AddCallbackTarget(this); }
private int multiplayerSceneIndex; //Number for the build index to the multiplay scene public override void OnEnable() { PhotonNetwork.AddCallbackTarget(this); }
public override void OnEnable() { base.OnEnable(); PhotonNetwork.AddCallbackTarget(this); //Scene }
private void OnEnable() { PhotonNetwork.AddCallbackTarget(this); }
public PhotonRoomManager() { PhotonNetwork.AddCallbackTarget(this); }