Наследование: CaptainsMessListener
Пример #1
0
    public override void OnStartClient()
    {
        if (instance) {
            Debug.LogError("ERROR: Another GameSession!");
        }
        instance = this;

        networkListener = FindObjectOfType<ExampleListener>();
        networkListener.gameSession = this;

        if (gameState != GameState.Lobby) {
            gameState = GameState.Lobby;
        }
    }
Пример #2
0
    void Awake()
    {
        grabInteractable = GetComponent <XRGrabInteractable>();
        rb            = GetComponent <Rigidbody>();
        myFlock       = GameObject.Find("Flock").GetComponent <Flock>();
        eventListener = GameObject.Find("ExampleListener").GetComponent <ExampleListener>();

        flockCap = myFlock.grabCap;

        grabInteractable.onHoverEntered.AddListener(SetHand);
        grabInteractable.onHoverExited.AddListener(ClearHand);
        grabInteractable.onSelectEntered.AddListener(SetMaster);
        grabInteractable.onSelectExited.AddListener(ClearMaster);
        eventListener.gripHandler.OnValueChange += GetGripValue;
    }
Пример #3
0
    public override void OnStartClient()
    {
        if (instance)
        {
            Debug.LogError("ERROR: Another GameSession!");
        }
        instance = this;

        networkListener             = FindObjectOfType <ExampleListener>();
        networkListener.gameSession = this;

        if (gameState != GameState.Lobby)
        {
            gameState = GameState.Lobby;
        }
    }
Пример #4
0
 public override void OnStartServer()
 {
     networkListener = FindObjectOfType<ExampleListener>();
     gameState = GameState.Connecting;
 }
Пример #5
0
 public override void OnStartServer()
 {
     networkListener   = FindObjectOfType <ExampleListener>();
     _arSessionManager = FindObjectOfType <ExampleARSessionManager> ();
     gameState         = GameState.Connecting;
 }