source: 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/InteractableObject.cs @ 8007

Revision 7807, 623 bytes checked in by tesatapa, 3 years ago (diff)

Tiedostot omiin luokkiinsa.
InteractableObject?, ja pelaaja ja testball voidaan nostaa kyytiin

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace VenienteFragore
7{
8    public delegate void InteractionHandler(SimplePhysics.Object interacter, InteractableObject interacted);
9
10    public class InteractableObject : SimplePhysics.Object
11    {
12        public event InteractionHandler OnInteractedWith;
13
14        public InteractableObject(double width, double height) : base(width, height)
15        {
16        }
17
18        public void InteractWith(SimplePhysics.Object actor)
19        {
20            OnInteractedWith?.Invoke(actor, this);
21        }
22
23    }
24}
Note: See TracBrowser for help on using the repository browser.