updates sets position on client
This commit is contained in:
parent
6afd91b0b7
commit
0f6937dbf4
2 changed files with 5 additions and 3 deletions
|
@ -93,9 +93,9 @@ namespace ZoFo.GameCore
|
|||
else if (update is UpdateGameObjectCreated)
|
||||
{
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "EntittyForAnimationTests")
|
||||
gameObjects.Add(new EntittyForAnimationTests(new Vector2(100, 100)));
|
||||
gameObjects.Add(new EntittyForAnimationTests((update as UpdateGameObjectCreated).position));
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
||||
gameObjects.Add(new Player(new Vector2(500, 100)));
|
||||
gameObjects.Add(new Player((update as UpdateGameObjectCreated).position));
|
||||
|
||||
(gameObjects.Last() as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||
//var a = Assembly.GetAssembly(typeof(GameObject));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -14,5 +15,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
|||
public UpdateGameObjectCreated() { UpdateType = "UpdateGameObjectCreated"; }
|
||||
public string GameObjectType;
|
||||
public string GameObjectId;
|
||||
public Vector2 position;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue