Merge branch 'DevelopmentX' of github.com:progtime-net/ZoFo into DevelopmentX
This commit is contained in:
commit
e9150c1717
5 changed files with 11 additions and 3 deletions
|
@ -197,6 +197,7 @@ namespace ZoFo.GameCore
|
|||
}
|
||||
else if (update is UpdateGameObjectCreated)
|
||||
{
|
||||
//TODO
|
||||
Entity created_gameObject;
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
||||
{
|
||||
|
|
|
@ -12,6 +12,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
|||
public class UpdateGameObjectDeleted : UpdateData
|
||||
{
|
||||
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
|
||||
public string GameObjectType;
|
||||
public string GameObjectType { get; set; }
|
||||
}
|
||||
}
|
|
@ -59,7 +59,10 @@ namespace ZoFo.GameCore.GameObjects
|
|||
|
||||
public virtual void Delete()
|
||||
{
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||
{
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,10 @@ public abstract class GameObject
|
|||
|
||||
public void Instantiate(GameObject gameObject)
|
||||
{
|
||||
AppManager.Instance.server.RegisterGameObject(gameObject);
|
||||
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||
{
|
||||
AppManager.Instance.server.RegisterGameObject(gameObject);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@ namespace ZoFo.GameCore
|
|||
networkManager.StartGame();
|
||||
new MapManager().LoadMap();
|
||||
|
||||
//TODO
|
||||
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(760, 140)));
|
||||
//for (int i = 0; i < 20; i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue