예제 #1
0
        public void Receive(int id, int timeout)
        {
            var target = api.GameObjects[(ObjectId)id];

            if (target == null)
            {
                return;
            }

            api.Click(target);

            if (string.IsNullOrEmpty(target.Name) && timeout > 0)
            {
                journal.When <Events.SpeechReceivedEvent>(
                    ev => ev.Speech.SpeakerId == target.Id,
                    ev => { })
                .WhenTimeout(() => { })
                .WaitAny(TimeSpan.FromMilliseconds(timeout));
            }
        }
예제 #2
0
 public void Click(int id) => infusionApi.Click((uint)id);