// wallTarget.js // // Script Type: Entity // Created by James B. Pollack @imgntn on 9/21/2015 // Copyright 2015 High Fidelity, Inc. // // This script resets an object to its original position when it stops moving after a collision // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // /*global print, MyAvatar, Entities, AnimationCache, SoundCache, Scene, Camera, Overlays, Audio, HMD, AvatarList, AvatarManager, Controller, UndoStack, Window, Account, GlobalServices, Script, ScriptDiscoveryService, LODManager, Menu, Vec3, Quat, AudioDevice, Paths, Clipboard, Settings, XMLHttpRequest, randFloat, randInt */ (function() { print('WALL TARGET SOMETHING') Script.include("../../libraries/utils.js"); function Target() { print('TARGET CONSTRUCTOR') return; } Target.prototype = { preload: function(entityID) { print('WALL TARGET PRELOAD!') this.entityID = entityID; }, collisionWithEntity:function(){ print('SOMETHING HIT MEH!!!@') } }; // entity scripts always need to return a newly constructed object of our type return new Target(); });