private void Dial_DialChanged(object sender, RoutedEventArgs e) { Maze3D.MazePumpDial Dial = (Maze3D.MazePumpDial)e.OriginalSource; Maze.DispenseReward(Dial.Name, 1); ScriptEditor.ShowReward(Dial); }
private void Sensor_SensorChanged(object sender, RoutedEventArgs e) { Maze3D.MazeSensor Sensor = (Maze3D.MazeSensor)e.OriginalSource; if (Sensor.IsTriggered) { if (ScriptFSM != null) { ScriptFSM.MatchSensor(Sensor.Name); } } ScriptEditor.ShowWhen(Sensor.Name); }
private void Door_DoorChanged(object sender, RoutedEventArgs e) { Maze3D.MazeDoor Door = (Maze3D.MazeDoor)e.OriginalSource; if (Door.IsClosed) { Maze.CloseDoor(Door.Name); } else { Maze.OpenDoor(Door.Name); } ScriptEditor.ShowDoorCommand(Door); }