1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class MultiPlayerManager : MonoSingleton<MultiPlayerManager>
- {
- public delegate void JoinRoom(SyncObject sycObj);
- public delegate void QuitRoom(SyncObject sycObj);
- public delegate void SynObject(SyncObject sycObj);
- public delegate void SynVideo(SyncVideo sycVideo);
- public JoinRoom OnJoinRoom;
- public QuitRoom OnQuitRoom;
- public SynObject OnSynObject;
- public SynVideo OnSynVideo;
- public Queue<SyncObject> qSyncObject;
- public Queue<SyncVideo> qSyncVideo;
- public void MessageCallBack(string message)
- {
- }
- public void RoomCallBack()
- {
- }
- public IEnumerator SendMessage()
- {
- while(true)
- {
- yield return new WaitForSeconds(0.4f);
-
-
- if(qSyncObject.Count>0)
- {
- }
- if(qSyncVideo.Count>0)
- {
-
- }
- }
- }
- }
- public class SyncObject
- {
- public string id { get; set; }
- public bool isSelect { get; set; }
- public bool objAction { get; set; }
- public Vector3 pos { get; set; }
- public Vector3 rot { get; set; }
- }
- public class SyncVideo
- {
- public string id { get; set; }
- public bool isPlay { get; set; }
- public float times { get; set; }
- }
- public enum SyncObjectType
- {
- Object,
- Video
- }
|