Ejemplo n.º 1
0
    public void MainPlayerMove(float tx, float ty, bool isHeadingRight)
    {
        //get player pixel position on map
        Vector2 pPos = foreController.WorldPositionToPixel(tx, ty, true);

        //send position to connector
        // if (isOnLocalTest){
        //  Debug.Log("Main Player Moved: " + ((int)pPos.x).ToString() + ", "+
        //               ((int)pPos.y).ToString() + ", " + ((int)(isHeadingRight?(byte)1:(byte)255)).ToString());
        //  return;
        // }
        connector.SendMove((int)pPos.x, (int)pPos.y, isHeadingRight?(byte)1:(byte)255);
    }