Beispiel #1
0
 private static Engagement CreateEngagement(EngagementType type, decimal amount, string name)
 {
     return(new Engagement {
         Id = Guid.NewGuid(),
         Name = name,
         Type = type,
         Amount = amount
     });
 }
Beispiel #2
0
 public InputController(EngagementType a_type, int id = -1)
 {
     if (a_type == EngagementType.Keyboard)
     {
         Device = new KeyboardHandler(InputManager.Instance.KeyboardDefaults());
     }
     else if (a_type == EngagementType.Controller)
     {
         Device = new GamepadHandler(id, InputManager.Instance.GamePadDefaults());
     }
 }
Beispiel #3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            EngagementType = await _context.EngagementType.SingleOrDefaultAsync(m => m.EngagementTypeId == id);

            if (EngagementType == null)
            {
                return(NotFound());
            }
            return(Page());
        }
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            EngagementType = await _context.EngagementType.FindAsync(id);

            if (EngagementType != null)
            {
                _context.EngagementType.Remove(EngagementType);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Beispiel #5
0
 public void Engage(EngagementType a_type, int id = -1)
 {
     Controller = new InputController(a_type, id);
     isEngaged  = true;
 }
 private void EngagePlayer(InputPlayer a_player, EngagementType a_type, int id = -1)
 {
     a_player.Engage(a_type, id);
 }