Difference between revisions of "Wintermute/Plugins"

Jump to navigation Jump to search
211 bytes removed ,  23:47, 18 February 2020
Line 64: Line 64:
GetSupportedClasses() exports one class: '''Displacement'''.
GetSupportedClasses() exports one class: '''Displacement'''.


Constructor parameters are not documented.
Constructor call is something like this: '''new Displacement(<entity1subframe>, <entity2subframe>, 3, 4, 7)''', parameters are not documented.


Required method: '''Animate()'''.
Required method: '''Animate()''' (called every 80 msec for constructed object at Door_Closeup scene)
 
Usage:
<nowiki>
var e1 = Scene.GetNode("Ent2");
var e1s = e1.GetSpriteObject();
var e1f = e1s.GetFrame(0);
var e1sf = e1f.GetSubframe(0);
var e2 = Scene.GetNode("Ent1");
var e2s = e2.GetSpriteObject();
var e2f = e2s.GetFrame(0);
var e2sf = e2f.GetSubframe(0);
var displobject = new Displacement(e1sf, e2sf, 3, 4, 7);
while(1) {
displobject.Animate();
Sleep(80);
}
</nowiki>


TODO: reimplement this for ScummVM.
TODO: reimplement this for ScummVM.
234

edits

Navigation menu