Sfoglia il codice sorgente

tutorial subtle improvement: change old style getWord(%this.upKey, 0) to %this.upKey._0 .

Charlie Patterson 12 anni fa
parent
commit
4a6b976446

+ 4 - 4
tutorials/fishTutorialBase/modules/DeadlyReef/scripts/behaviors/movement/shooterControls.cs

@@ -42,10 +42,10 @@ function ShooterControlsBehavior::onBehaviorAdd(%this)
     if (!isObject(GlobalActionMap))
        return;
 
-    GlobalActionMap.bindObj(getWord(%this.upKey, 0), getWord(%this.upKey, 1), "moveUp", %this);
-    GlobalActionMap.bindObj(getWord(%this.downKey, 0), getWord(%this.downKey, 1), "moveDown", %this);
-    GlobalActionMap.bindObj(getWord(%this.leftKey, 0), getWord(%this.leftKey, 1), "moveLeft", %this);
-    GlobalActionMap.bindObj(getWord(%this.rightKey, 0), getWord(%this.rightKey, 1), "moveRight", %this);
+    GlobalActionMap.bindObj(%this.upKey._0, %this.upKey._1, "moveUp", %this);
+    GlobalActionMap.bindObj(%this.downKey._0, %this.downKey._1, "moveDown", %this);
+    GlobalActionMap.bindObj(%this.leftKey._0, %this.leftKey._1, "moveLeft", %this);
+    GlobalActionMap.bindObj(%this.rightKey._0, %this.rightKey._1, "moveRight", %this);
 
     %this.up = 0;
     %this.down = 0;