This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

source: ps/trunk/binaries/data/mods/public/maps/random/rmgen/Entity.js

Last change on this file was 21290, checked in by elexis, 7 years ago

Use CamelCase for random map files containing the prototype of the same name, refs #5042, #4804.

  • Property svn:eol-style set to native
File size: 731 bytes
RevLine 
[20337]1/**
[20400]2 * @file The Entity class stores the given template name, owner and location of an entity and assigns an entityID.
[21069]3 * Instances of this class (with the position using the tile coordinate system) are
4 * converted by ScriptConversions.cpp to the Entity struct defined in source/graphics/Entity.h and passed to MapReader.cpp.
[20337]5 */
[10326]6// TODO: support full position and rotation
[21069]7function Entity(entityID, templateName, playerID, position, orientation)
[9096]8{
[21069]9 this.player = playerID;
[10326]10 this.templateName = templateName;
[21069]11 this.id = entityID;
12 this.position = new Vector3D(position.x, 0, position.y);
13 this.rotation = new Vector3D(0, orientation, 0);
14}
[18840]15
[21069]16Entity.prototype.GetPosition2D = function()
17{
18 return Vector2D.from3D(this.position);
19};
Note: See TracBrowser for help on using the repository browser.