Skip to content

Commit

Permalink
adjust enemy
Browse files Browse the repository at this point in the history
  • Loading branch information
kengonakajima committed Jul 24, 2011
1 parent 3dbf0df commit bcd3eda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion cli/fpstest1/Assets/ControlerScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ function OnGUI () {
if( prevSel != selectedInventoryIndex ){
herosc.SetToolTex( shortcutTextures[ selectedInventoryIndex ] );
}
if( Event.current.keyCode == KeyCode.X ) attackKeyHit = true;
if( Event.current.keyCode == KeyCode.X ||
Event.current.keyCode == KeyCode.N ||
Event.current.keyCode == KeyCode.E ) attackKeyHit = true;
if( Event.current.keyCode == KeyCode.Return ) enterKeyHit = true;
}

Expand Down
Binary file modified cli/fpstest1/Assets/FireballPrefab.prefab
Binary file not shown.
Binary file modified cli/fpstest1/Assets/MobballPrefab.prefab
Binary file not shown.
7 changes: 4 additions & 3 deletions sv/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ function ghostMove( curTime ) {
main.nearcast( this.pos, "smoke", this.pos.x, this.pos.y, this.pos.z );
return false;
}


this.velocity.y = 0;

Expand All @@ -217,7 +218,7 @@ function ghostMove( curTime ) {
this.pitch = this.pos.getPitch( diff );

if( this.counter > 100 && ( this.counter % 100 ) == 0 && this.hate ){
var b = this.shootAt( "fireball", 8, 10, 2, 1000, this.targetPos );
var b = this.shootAt( "fireball", 8, 5, 2, 1000, this.targetPos );
b.sendMark = false;
main.nearcast( this.pos, "fire", this.pos.x, this.pos.y, this.pos.z, "fireball" );
}
Expand All @@ -232,7 +233,7 @@ function ghostMove( curTime ) {
} else {
this.velocity.y = -1;
}

if( this.counter < 100 ) this.vForce = 0;



Expand Down Expand Up @@ -621,7 +622,7 @@ Actor.prototype.poll = function(curTime) {

// 送信. 落ちてる最中ではない場合は、あまり多く送らない
var toSend = false;

if( this.counter == 1 ) toSend = true;
if( this.lastSentAt < (curTime-500) ) toSend = true;
if( this.velocity.y != 0 && ( this.lastSentAt < ( curTime-50) ) ) toSend = true;

Expand Down

0 comments on commit bcd3eda

Please sign in to comment.