Esempio n. 1
0
    public void LastAim(NetworkMessage netMsg)
    {
        Callipso.GameSession _currentSession = sessions.Find(x => x.agents.Find(e => e.user != null && e.user.connectionId == netMsg.conn.connectionId)); // currently in session
        if (_currentSession == null || !_currentSession.isStarted)
        {                                                                                                                                                 // Not in a session or session is not started
            netMsg.conn.Disconnect();
            return;
        }

        MObjects.LastAim mObject = netMsg.ReadMessage <MObjects.LastAim>();
        _currentSession.LastAim(netMsg.conn.connectionId, mObject.y, mObject.pos);
    }