public void notify( IIwEvent evt ) { if ( evt.name == PlayerWire.PLAYER_LIVES_CHANGED ) { PlayerWire playerData = IwGameDemo.Instance.getWire ( PlayerWire.NAME ) as PlayerWire; _livesToShow = playerData.lives; } }
public void execute( IIwEvent evt ) { PlayerWire player = IwGameDemo.Instance.getWire (PlayerWire.NAME) as PlayerWire; if ( player != null ) { player.lives--; } }
public void executeCommands( IIwEvent evt ) { if ( hasEvent ( evt.name ) ) { List <Type> tmpCommandsByEventName = _commandList[evt.name]; foreach ( Type tmpCommandClass in tmpCommandsByEventName ) { IIwCommand tmpCommand = Activator.CreateInstance ( tmpCommandClass ) as IIwCommand; tmpCommand.dispatcher = _dispatcher; tmpCommand.execute ( evt ); } } }
public void notify( IIwEvent evt ) { if ( evt.name == IwPlayerView.PLAYER_WRONG ) { renderer.material.color = Color.red; _inAttack = true; // here you can write your code for attack } else if ( evt.name == IwPlayerView.PLAYER_IS_SAFE ) { renderer.material.color = Color.green; _inAttack = false; // here you can write your code for idle } }
public void notifyViews( IIwEvent evt ) { if ( !hasViewsByEvent ( evt.name ) ) return; List<IIwView> tmpViewsToNotify = _viewsForNotify [evt.name]; foreach ( IIwView tmpView in tmpViewsToNotify ) { tmpView.notify ( evt ); } }
private void HandleOnTriggerEvent(IIwEvent evt) { _controller.executeCommands (evt); _viewsMgr.notifyViews (evt); }
public void notify( IIwEvent evt ) { }