summaryrefslogtreecommitdiff
path: root/src/engine/components/Interactable.ts
blob: 2937596602c42b0bd52b99c1d282eddadef5a74f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Component, ComponentNames } from ".";

export class Interactable extends Component {
  private interaction: Function;

  constructor(interaction: Function) {
    super(ComponentNames.Interactable);

    this.interaction = interaction;
  }

  public interact() {
    this.interaction();
  }
}