public void OccupyBehaviour(object asset, string assetName, object userdata, StructureBehaviourCallback callbacks)
        {
            UnityGameFramework.Runtime.Entity ent = userdata as UnityGameFramework.Runtime.Entity;
            Structure structLogic = ent.Logic as Structure;

            if (structLogic.Occupyed)
            {
                callbacks.occupyCallback(asset, assetName, userdata, false);
            }
            else
            {
                callbacks.unOccupyCallback(asset, assetName, userdata, false);
            }
        }
Beispiel #2
0
 protected void InitCallbacks()
 {
     m_loadForOccupyCallbacks = new GameFramework.Resource.LoadAssetCallbacks(
         LoadResourceForOccupySuccessCallback);
     m_StructureCallbacks = new StructureBehaviourCallback(OnOccupy, OnUnOccupy);
 }