TwilightWarsLib master READ ONLY 0
  • explorer
  • search
a [App]
a CG.TwilightWarsLib
a README.md
a app.ts
a [Test]
a test
  • README.md

TwilightWarsLib

A Top-down view shooting game framework.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

To start a .event

CG.TwilightWarsLib.initialize()
    .then(() => {
        CG.TwilightWarsLib.events.startEvents('test/test.events', 'arena');
    })

To manually setup the game:


CG.TwilightWarsLib.initialize() .then(() => let mapSource = 'test/test.twmap'; CG.Base.resourceManager.addAppSource(mapSource); CG.Base.resourceManager.load(() => { let mapResource = new CG.TWMap.resources.MapResource(); mapResource.importBase64(CG.Base.resourceManager.getText(mapSource)); mapResource.loadTextures(() => { CG.Base.pixi.initialize(600, 500); let game = new CG.TwilightWarsLib.games.Game(); CG.Base.pixi.root.addChild(game); game.initResources(mapResource); game.start(); console.log('tw game created'); let me = new CG.TwilightWarsLib.games.actors.Actor(game, 'me'); game.addActor(me, new MyActorController(me), 32, 100, 0, null); game.gameCamera.setFocus(me); game.interface.setMe(me); let ai = new CG.TwilightWarsLib.games.actors.Actor(game, 'ai'); ai.camp = CG.TwilightWarsLib.games.datas.Camp.CAMP2; ai.actorClip.headClip.clip.gotoAndStop(5); game.addActor(ai, new CG.TwilightWarsLib.games.actors.controllers.AIController(ai), 160, 300, 0, null); game.createStuff(null, 64 + 16, 128 + 16, CG.TwilightWarsLib.games.items.StuffInfo.getByCode('sword'), game.stuffManager.useNextStuffId(), true); }); }); })

Versioning

We use SemVer for versioning.

Authors

Acknowledgments

  • Hat tip to anyone who's code was used
  • Inspiration
  • etc
READ ONLY
  • problem
  • console
No problems have been detected so far.
Ln 1, Col 1, Sel 0
Markdown