예제 #1
0
        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");
        }
예제 #2
0
        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");
        }