compnents inherit from Component
This commit is contained in:
parent
e63e76f0a3
commit
5d979b3e5c
5 changed files with 11 additions and 5 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { Point } from "../Datatypes/point"
|
||||
import { Texture } from "pixi.js"
|
||||
import { Component } from "ecsy"
|
||||
|
||||
|
||||
// Door component
|
||||
export class Door {
|
||||
export class Door extends Component {
|
||||
open: boolean
|
||||
|
||||
openPosition: Point
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { Point } from "../Datatypes/point"
|
||||
import { Component } from "ecsy"
|
||||
|
||||
// Position component
|
||||
export class Position {
|
||||
export class Position extends Component {
|
||||
value: Point
|
||||
|
||||
reset() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { Component } from "ecsy"
|
||||
|
||||
// Shape component
|
||||
export class Shape {
|
||||
export class Shape extends Component {
|
||||
onStage = false
|
||||
shape: PIXI.Graphics
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Sprite } from "pixi.js";
|
||||
import { Component } from "ecsy";
|
||||
|
||||
export class SpriteRenderer{
|
||||
export class SpriteRenderer extends Component{
|
||||
sprite: Sprite
|
||||
|
||||
reset() :void {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { Vector } from "../Datatypes/vector"
|
||||
import { Component } from "ecsy"
|
||||
|
||||
// Velocity component
|
||||
export class Velocity {
|
||||
export class Velocity extends Component {
|
||||
value: Vector
|
||||
|
||||
reset() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue