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)
|
else if (update is UpdateGameObjectCreated)
|
||||||
{
|
{
|
||||||
|
//TODO
|
||||||
Entity created_gameObject;
|
Entity created_gameObject;
|
||||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
||||||
public class UpdateGameObjectDeleted : UpdateData
|
public class UpdateGameObjectDeleted : UpdateData
|
||||||
{
|
{
|
||||||
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
|
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
|
||||||
public string GameObjectType;
|
public string GameObjectType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -58,9 +58,12 @@ namespace ZoFo.GameCore.GameObjects
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Delete()
|
public virtual void Delete()
|
||||||
|
{
|
||||||
|
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||||
{
|
{
|
||||||
AppManager.Instance.server.DeleteObject(this);
|
AppManager.Instance.server.DeleteObject(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,12 @@ public abstract class GameObject
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Instantiate(GameObject gameObject)
|
public void Instantiate(GameObject gameObject)
|
||||||
|
{
|
||||||
|
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||||
{
|
{
|
||||||
AppManager.Instance.server.RegisterGameObject(gameObject);
|
AppManager.Instance.server.RegisterGameObject(gameObject);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ namespace ZoFo.GameCore
|
||||||
networkManager.StartGame();
|
networkManager.StartGame();
|
||||||
new MapManager().LoadMap();
|
new MapManager().LoadMap();
|
||||||
|
|
||||||
|
//TODO
|
||||||
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(760, 140)));
|
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(760, 140)));
|
||||||
//for (int i = 0; i < 20; i++)
|
//for (int i = 0; i < 20; i++)
|
||||||
|
|
Loading…
Add table
Reference in a new issue