Пример #1
0
    public void SendBallMessage(GameObject ball, int id, bool isAbilityBall = false)
    {
        string s = SerializationScript.SerializeTransform("1", ball.transform, GameEvent.BALL_TRANSFORM, isAbilityBall);

        SendData(s, 1, true, id);

        Vector3 move = ball.GetComponent <Rigidbody>().velocity;

        s = SerializationScript.SerializeBallVelocityMessage(move, id, isAbilityBall);
        SendData(s, 1, true, id);
    }
Пример #2
0
    public void SendUpdateForPlayerPosition()
    {
        string s = SerializationScript.SerializeTransform("12", _localPlayer.transform, GameEvent.PLAYER_TRANSFORM);

        SendData(s, 1, true);
    }