Example #1
0
 //FixedUpdate to go by time
 public override void FixedUpdate()
 {
     //Freeze enemies if the game is paused
     if (PauseScreen.shouldPause(PAUSE_LEVEL))
     {
         GetAgent.SetDestination(transform.position);
         return;
     }
     base.FixedUpdate();
 }
        /// <summary>
        /// Helper method to initiate the call that gets KeyValue items.
        /// </summary>
        /// <param name="clientIdentity">The hawaii client identity.</param>
        /// <param name="prefix">Specifies the search prefix keyword.</param>
        /// <param name="size">Specifies the size of result.</param>
        /// <param name="continuationToken">Specifies the continuation token.</param>
        /// <param name="onComplete">Specifies an "on complete" delegate callback.</param>
        /// <param name="stateObject">Specifies a user-defined object.</param>
        private static void GetAsync(
            ClientIdentity clientIdentity,
            string prefix,
            int size,
            string continuationToken,
            ServiceAgent<GetResult>.OnCompleteDelegate onComplete,
            object stateObject)
        {
            GetAgent agent = new GetAgent(
                KeyValueService.HostName,
                clientIdentity,
                prefix,
                size,
                continuationToken,
                stateObject);

            agent.ProcessRequest(onComplete);
        }