private void HandleNewCharacterCreated(object sender, NewCharacterCreatedEventArgs e) { model.Name = e.Name; model.Speed = e.Speed; model.Health = e.Health; model.Ammo = e.Ammo; view.GoToScene("Game"); }
public CharacterController(ICharacterModel model, ICharacterView view) { this.model = model; this.view = view; this.model.NameChanged += HandleChangeName; this.model.SpeedChanged += HandleChangeSpeed; this.model.HealthChanged += HandleChangeHealth; this.model.AmmoChanged += HandleChangeAmmo; this.view.GetDamaged += HandleGetDamaged; this.view.NewCharacterCreated += HandleNewCharacterCreated; this.view.GoingToMenu += HandleGoingToMenu; view.GoToScene("Menu"); }