예제 #1
0
    public int D20QueryPython(GameObject obj, string queryKey, object arg)
    {
        var dispatcher = obj.GetDispatcher();

        if (dispatcher == null)
        {
            return(0);
        }

        var dispIo = new DispIoD20Query();

        dispIo.return_val = 0;
        dispIo.obj        = arg;
        dispatcher.Process(DispatcherType.PythonQuery, (D20DispatcherKey)ElfHash.Hash(queryKey), dispIo);
        return(dispIo.return_val);
    }
예제 #2
0
 public void TestParticleSystemName()
 {
     Assert.AreEqual(2908521, ElfHash.Hash("MM-ChainFlyBy".ToLowerInvariant()));
     Assert.AreEqual(2908521, ElfHash.Hash("MM-ChainFlyBy"));
 }
예제 #3
0
 public static ConditionSpec.Builder AddSignalHandler(this ConditionSpec.Builder builder,
                                                      string signal, SubDispatcherCallback callback)
 {
     builder.AddHandler(DispatcherType.PythonSignal, (D20DispatcherKey)ElfHash.Hash(signal), callback);
     return(builder);
 }
예제 #4
0
 public static ConditionSpec.Builder AddQueryHandler(this ConditionSpec.Builder builder, string query,
                                                     SubDispatcherCallback callback)
 {
     builder.AddHandler(DispatcherType.PythonQuery, (D20DispatcherKey)ElfHash.Hash(query), callback);
     return(builder);
 }
예제 #5
0
 public void D20SignalPython(GameObject handle, string queryKey, int arg1 = 0, int arg2 = 0)
 {
     D20SignalPython(handle, (D20DispatcherKey)ElfHash.Hash(queryKey), arg1, arg2);
 }
예제 #6
0
 public ulong D20QueryReturnData(GameObject obj, string queryKey, int arg1 = 0, int arg2 = 0)
 {
     return(D20QueryReturnData(obj, (D20DispatcherKey)ElfHash.Hash(queryKey), arg1, arg2));
 }
예제 #7
0
 public int D20QueryInt(GameObject obj, string queryKey, int data1 = 0, int data2 = 0)
 => D20QueryInt(obj, (D20DispatcherKey)ElfHash.Hash(queryKey), data1, data2);
 public FeatConditionAttribute(string featName)
 {
     FeatId = (FeatId)ElfHash.Hash(featName);
 }
예제 #9
0
 public SelectableFeat(string featEnum) : this((FeatId)ElfHash.Hash(featEnum))
 {
 }
예제 #10
0
 public static void D20SendSignal(this GameObject obj, string signal, int data = 0)
 {
     GameSystems.D20.D20SendSignal(obj, (D20DispatcherKey)ElfHash.Hash(signal), data);
 }