示例#1
0
 public void Action(ApolloActionBufferBase info, ApolloActionDelegate callback)
 {
     if (info == null)
     {
         ADebug.LogError("PayService Action Info == null");
     }
     else
     {
         byte[] buffer;
         if (!info.Encode(out buffer))
         {
             ADebug.LogError("Action Encode error!");
         }
         else
         {
             if (this.actionCallbackCollection.ContainsKey(info.Action))
             {
                 this.actionCallbackCollection[info.Action] = callback;
             }
             else
             {
                 this.actionCallbackCollection.Add(info.Action, callback);
             }
             apollo_pay_action(buffer, buffer.Length);
         }
     }
 }
示例#2
0
 public void Action(ApolloActionBufferBase info, ApolloActionDelegate callback)
 {
     if (info == null)
     {
         ADebug.LogError("PayService Action Info == null");
         return;
     }
     byte[] array;
     if (!info.Encode(out array))
     {
         ADebug.LogError("Action Encode error!");
         return;
     }
     if (this.actionCallbackCollection.ContainsKey(info.Action))
     {
         this.actionCallbackCollection[info.Action] = callback;
     }
     else
     {
         this.actionCallbackCollection.Add(info.Action, callback);
     }
     ApolloPayService.apollo_pay_action(array, array.Length);
 }
示例#3
0
 public bool Pay(ApolloActionBufferBase payInfo)
 {
     byte[] array;
     payInfo.Encode(out array);
     return(this.inited && ApolloPayService.apollo_pay_Pay(array, array.Length));
 }
示例#4
0
 public bool Pay(ApolloActionBufferBase payInfo)
 {
     byte[] buffer;
     payInfo.Encode(out buffer);
     return(this.inited && apollo_pay_Pay(buffer, buffer.Length));
 }