示例#1
0
    public void PaintReceiveRPC(int posX, int posY, byte[] colorArray, string quadrantID, PhotonMessageInfo info)
    {
        List <Quadrant> allQuadrants = root.GetLeafQuadrants();
        Quadrant        quadrant     = allQuadrants.Find(x => x.id == quadrantID);
        Color           color        = new Color((float)colorArray[0] / 255, (float)colorArray[1] / 255, (float)colorArray[2] / 255, (float)colorArray[3] / 255);

        quadrant.EditTerrain(new Vector2Int(posX, posY), color);
    }