示例#1
0
    private static NetworkEntity CreateEntity(uint netID, uint cellID, string path, bool local)
    {
        GameObject    obj = GameObject.Instantiate(Resources.Load(path)) as GameObject;
        NetworkEntity ent = obj.GetComponent <NetworkEntity>();

        ent.cellID            = cellID;
        ent.locallyControlled = local;
        EntityManager.Register(ent, netID);
        ent.Init();
        return(ent);
    }