Skip to content

Commit 0f05af8

Browse files
committed
up
1 parent bed946e commit 0f05af8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Assets/Scripts/u3d_scripts/GameEntity.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class GameEntity : MonoBehaviour
3131

3232
public CharacterController characterController;
3333

34-
public bool isOnGound = true;
34+
public bool isOnGround = true;
3535

3636
public bool entityEnabled = true;
3737

@@ -205,11 +205,11 @@ void Update ()
205205
{
206206
characterController.stepOffset = deltaSpeed;
207207

208-
if(isOnGound != characterController.isGrounded)
208+
if(isOnGround != characterController.isGrounded)
209209
{
210210
KBEngine.Entity player = KBEngineApp.app.player();
211-
player.isOnGound = characterController.isGrounded;
212-
isOnGound = characterController.isGrounded;
211+
player.isOnGround = characterController.isGrounded;
212+
isOnGround = characterController.isGrounded;
213213
}
214214

215215
return;
@@ -222,7 +222,7 @@ void Update ()
222222

223223
float dist = 0.0f;
224224

225-
if(isOnGound)
225+
if(isOnGround)
226226
{
227227
dist = Vector3.Distance(new Vector3(destPosition.x, 0f, destPosition.z),
228228
new Vector3(position.x, 0f, position.z));
@@ -271,7 +271,7 @@ void Update ()
271271
else
272272
pos = destPosition;
273273

274-
if(isOnGound)
274+
if(isOnGround)
275275
pos.y = currY;
276276

277277
position = pos;

Assets/Scripts/u3d_scripts/World.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void createPlayer()
150150
}
151151

152152
float y = avatar.position.y;
153-
if(avatar.isOnGound)
153+
if(avatar.isOnGround)
154154
y = 1.3f;
155155

156156
player = Instantiate(avatarPerfab, new Vector3(avatar.position.x, y, avatar.position.z),
@@ -172,7 +172,7 @@ public void onEnterWorld(KBEngine.Entity entity)
172172
return;
173173

174174
float y = entity.position.y;
175-
if(entity.isOnGound)
175+
if(entity.isOnGround)
176176
y = 1.3f;
177177

178178
entity.renderObj = Instantiate(entityPerfab, new Vector3(entity.position.x, y, entity.position.z),
@@ -229,7 +229,7 @@ public void updatePosition(KBEngine.Entity entity)
229229

230230
GameEntity gameEntity = ((UnityEngine.GameObject)entity.renderObj).GetComponent<GameEntity>();
231231
gameEntity.destPosition = entity.position;
232-
gameEntity.isOnGound = entity.isOnGound;
232+
gameEntity.isOnGround = entity.isOnGround;
233233
}
234234

235235
public void set_direction(KBEngine.Entity entity)

0 commit comments

Comments
 (0)