Skip to content
This repository has been archived by the owner. It is now read-only.

Separate main project components into classes #18

Open
JoshuaKGoldberg opened this issue Apr 8, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@JoshuaKGoldberg
Copy link
Member

commented Apr 8, 2016

Instead of FSM.animate*, for example, those should be in a FullScreenMarioAnimations (class? container? namespace?) defined in a separate file.

Requires Typescript 2.0 for specifying this for functions.

@JoshuaKGoldberg

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2016

Proposal: have classes as containers, with static instances of them in the FullScreenPokemon class.

FullScreenPokemon.ts:

class FullScreenPokemon {
    // ...
    public static readonly Macros: MacrosBag = new FullScreenPokemonMacros();
    // ...
}

settings/maps.ts:

namespace FullScreenPokemon {
    FullScreenPokemon.prototype.settings.maps = {
        // ...
        macros: {
            House: FullScreenPokemon.Macros.House
        }
        // ...
    };
}

MacrosBag.ts:

namespace FullScreenPokemon {
    export class MacrosBag {
        public House(/* ... */) { /* ... */ }
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.