Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by quidmonkey

I'm tinkering with isometry & Impact. To go along with overwriting the Entity & Map draw(), I'd like to overwrite the draw() in wm for the cursor, background & entities. How and what do I need to change in wm to do that?

EDIT

I should also mention that I'll need to calculate zIndex for entties and will be adding one to the background-map. I'd like to know where wm creates the JSON string so that I make sure .zIndex gets calculated and saved automatically.

1 decade ago by dominic

Weltmeister calls the draw() methods on ig.Entity and ig.BackgroundMap, so you should only need to write you new draw functions once.

However, background maps in Weltmeister are not created as ig.BackgroundMap, but as wm.EditMap - a subclass of ig.BackgroundMap to add some editing functionality. The wm.EditMap also has a drawCursor() method. See weltmeister/edit-map.js

The save function is in weltmeister/weltmeister.js starting at line 305.

1 decade ago by quidmonkey

Thx for the feedback.

1 decade ago by paulh

Hey Quidmonkey, any chance you could share anything you learned from this .. i got a lot to learn about the draw and it scares me :-)
Page 1 of 1
« first « previous next › last »