House02.js 774 B

12345678910111213141516171819202122232425262728293031323334
  1. var game = Atomic.game;
  2. var node = self.node;
  3. House02 = self;
  4. var idle = true;
  5. node.position = [15, 0, -20];
  6. node.yaw(75);
  7. node.scale = [11.9, 6, 8];
  8. function start() {
  9. var cache = game.cache;
  10. var model = node.createComponent("StaticModel");
  11. model.setModel(cache.getResource("Model", "Models/House.mdl"));
  12. model.setMaterial(cache.getResource("Material", "Materials/House.xml"));
  13. model.castShadows = true;
  14. var body = node.createComponent("RigidBody");
  15. body.isKinematic = true;
  16. body.collisionEventMode = Atomic.COLLISION_ALWAYS;
  17. var shape = node.createComponent("CollisionShape");
  18. shape.setTriangleMesh(model.getModel());
  19. shape.size = [1, 1, 1];
  20. shape.position = [0, 0, 0];
  21. }
  22. function update(timeStep) {
  23. }