Skip to content

Super Mario training by Meth Meth Method using Snowpack template for TypeScript.

Notifications You must be signed in to change notification settings

DenisTimofijuk/super_mario_snowpack_ts

Repository files navigation

Super Mario game

This is a well known Super Mario game recreated with TypeScript.

Original tutorial: Super Mario Bros in JavaScript

Using Snowpack

Comments

Currently I really don't like how I managed traits adding with TypeScript. I would love to hear a better solutions for such case.

 type TraitType = Jump | Go | PendulumMoove | GoombaBehaviour | Stomper | Killable | PlayerController | KoopaBehaviour | Solid | Physics;
 type TraitTypeTSworkaround = Jump & Go & PendulumMoove & GoombaBehaviour & Stomper & Killable & PlayerController & KoopaBehaviour & Solid & Physics;

 addTrait(trait: TraitType) {
    this.traits.push(trait);
    this[trait.NAME] = trait as TraitTypeTSworkaround;
  }

About

Super Mario training by Meth Meth Method using Snowpack template for TypeScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published