예제 #1
0
        bool netPlateActive = false; //movingPlate是否存在,netMovingPlate根据plateActive来决定是否更改位置
        #endregion

        #region MonoBehaviour Callbacks

        private void Awake()
        {
            logic      = FindObjectOfType <NetGameLogic>();
            photonView = GetComponent <PhotonView>();

            storedPosition  = logic.TopPlate.transform.position;
            networkPosition = Vector3.zero;
        }
        private void Start()
        {
            _effectManager = new EffectManage();

            PhotonPeer.RegisterType(typeof(NetData), (byte)'M', SerializeMoveDir, DeserializeMoveDir);

            Logic = GetComponent <NetGameLogic>();
            Global.Instance.MyData.Ready = true;
            Global.Instance.FindData(Global.Instance.MyData).Ready = true;

            PhotonNetwork.Instantiate("NetTransform", Vector3.zero, Quaternion.identity);

            if (PhotonNetwork.IsMasterClient)
            {
                photonView.StartCoroutine(WaitForOtherPlayersStart());
            }
        }