Ejemplo n.º 1
0
        private BaseMonoDynamicObject CreateDynamicObjectEntityInstance(uint ownerID, string type, uint runtimeID)
        {
            BaseMonoDynamicObject component = UnityEngine.Object.Instantiate <GameObject>(this.GetDynamicObjectPrototype(type)).GetComponent <BaseMonoDynamicObject>();

            component.Init(runtimeID, ownerID);
            this._dynamicObjects.Add(runtimeID, component);
            this._dynamicLs.Add(component);
            return(component);
        }
Ejemplo n.º 2
0
        private BaseMonoDynamicObject RegisterAsDynamicObject(uint ownerID, GameObject go)
        {
            uint nextRuntimeID = Singleton <RuntimeIDManager> .Instance.GetNextRuntimeID(6);

            BaseMonoDynamicObject component = go.GetComponent <BaseMonoDynamicObject>();

            component.Init(nextRuntimeID, ownerID);
            this._dynamicObjects.Add(nextRuntimeID, component);
            this._dynamicLs.Add(component);
            return(component);
        }