Example #1
0
        private void RecieveMapMessage(MapNetworkMessage mapNetworkMessage)
        {
            if (ModelMapStateChangedEvent != null)
            {
                var eventArgs = new MapMessageEventArgs();
                eventArgs.map = mapNetworkMessage.map;

                ModelMapStateChangedEvent(this, eventArgs);
            }
        }
Example #2
0
    private void DrawMapImage(object sender, MapMessageEventArgs e)
    {
        var texture = CreateMapTexture(e.map);

        var rectangular = new Rect(0.0f, 0.0f, texture.width, texture.height);
        var pivot       = new Vector2(0.5f, 0.5f);

        Sprite mySprite = Sprite.Create(texture, rectangular, pivot);

        imageMap.sprite = mySprite;
    }