private void SendGrid(Grid tetrisGrid) { var msg = new MvvmMessage() { TetrisGrid = tetrisGrid }; Messenger.Default.Send <MvvmMessage>(msg); }
private void HandleMessage(MvvmMessage message) { if (TetrisGrig == null) { TetrisGrig = message.TetrisGrid; GridFill = new Rectangle[TetrisGrig.ColumnDefinitions.Count, TetrisGrig.RowDefinitions.Count]; _GameBoard = new GameBoard(_TetrisGrid.RowDefinitions.Count, _TetrisGrid.ColumnDefinitions.Count); AddChildrenToGrid(); } }
void OnMessageReceived(MvvmMessage message) { if (message.Type == MessageType.MeshUpdate) { Viewport.MeshRenderer.SetMesh(message.Data as FluxMesh); } else if (message.Type == MessageType.MeshLoadDiffuseTexture) { Viewport.MeshRenderer.SetDiffuseTexture((string)message.Data); } else if (message.Type == MessageType.MeshLoadNormalTexture) { Viewport.MeshRenderer.SetNormalTexture((string)message.Data); } else if (message.Type == MessageType.PhysicsMeshUpdate) { Viewport.PhysicsDebugRenderer.SetPhysicsMesh(message.Data as PhysicsMesh); } }