コード例 #1
0
ファイル: WorldObjects.cs プロジェクト: drzo/opensim4opencog
 static public object GetScriptableObject(object id)
 {
     if (id is NamedParam)
     {
         NamedParam kv = (NamedParam)id;
         id = new NamedParam(kv.Key, GetScriptableObject(kv.Value));
     }
     if (id is UUID)
     {
         UUID uid = (UUID)id;
         if (uid == UUID.Zero) return id;
         id = GridMaster.GetObject(uid);
     }
     if (id is Primitive) return GridMaster.GetSimObject((Primitive)id);
     // if (id is String) return Master.GetObject((string) id);
     return id;
 }
コード例 #2
0
ファイル: WorldObjects.cs プロジェクト: drzo/opensim4opencog
        public override bool BooleanOnEvent(string eventName, string[] paramNames, Type[] paramTypes, params object[] parameters)
        {

            if (eventName.EndsWith("On-Image-Receive-Progress")) return true;
            if (eventName.EndsWith("On-Log-Message")) return true;
            if (eventName.EndsWith("Look-At")) return true;
            var parms = new NamedParam[paramNames.Length];
            for (int i = 0; i < paramNames.Length; i++)
            {
                parms[i] = new NamedParam(paramNames[i], paramTypes[i],parameters[i]);
            }
            CogbotEvent evt = ACogbotEvent.CreateEvent(client, eventName, SimEventType.Once | SimEventType.UNKNOWN | SimEventType.REGIONAL, parms);
            client.SendPipelineEvent(evt);
            return true;
        }