Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Hulha committed Nov 22, 2013
1 parent 9e6ea80 commit afebe1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions js/loadScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ require([
z2.aIComponent.addBehavior({name:"Zombie-Idle", update:ZombieIdle}, 0);
z2.aIComponent.addBehavior({name:"Zombie-PathFind", update:ZombiePathFind}, 1);
// z2.addToWorld();
Game.zombie = zombie;
Game.zombieRoot = zombie.transformComponent.parent.entity;

//console.log(navRef);

Expand Down Expand Up @@ -386,7 +384,7 @@ require([
node.doorPos = navMesh.room[entity.room].door[node.curNode.door].center;
entity.aIComponent.setActiveByName("Zombie-Idle", false);
node.state = 1;
var eac = Game.zombieRoot.animationComponent;
var eac = entity.transformComponent.parent.entity.animationComponent;
eac.transitionTo( eac.getStates()[1]);
}
break;
Expand All @@ -407,7 +405,7 @@ require([
node.doorPos = navMesh.room[entity.room].door[node.curNode.door].center;
entity.aIComponent.setActiveByName("Zombie-Idle", false);
node.state = 1;
var eac = Game.zombieRoot.animationComponent;
var eac = entity.transformComponent.parent.entity.animationComponent;
eac.transitionTo( eac.getStates()[1]);
}
else{
Expand Down
4 changes: 2 additions & 2 deletions lib/FPSCamComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define([
var entityTransform;
var cam;
var camTransform;
var speed = 5;
var speed = 10;
var tmpVec = new Vector3();
var fwdBase = new Vector3(0,0,-1);
var leftBase = new Vector3(-1,0,0);
Expand All @@ -53,7 +53,7 @@ define([
this.type = "FPSCamComponent";
//entity = entityRef;
entityTransform = Game.userEntity.transformComponent.transform;
cam = EntityUtils.createTypicalEntity(Game.goo.world, new Camera(45, 1.0, 0.01, 100));
cam = EntityUtils.createTypicalEntity(Game.goo.world, new Camera(45, 1.0, 0.01, 130));
Game.viewCam = cam;
camTransform = cam.transformComponent.transform;
cam.addToWorld();
Expand Down

0 comments on commit afebe1c

Please sign in to comment.