예제 #1
0
        public override void OnBuildingRelocated(ushort id)
        {
            _chirperMessageSender.SendMessage(
                _grumpyEngine.GetRandomName(),
                _grumpyEngine.GetRandomMessage(GrumpinessTrigger.BuildingRelocated));

            base.OnBuildingRelocated(id);
        }
예제 #2
0
        public void OnNewMessage(IChirperMessage message)
        {
            var shouldSend = _random.Next(0, 100) > (_probabilityOfResponding * 100);

            if (!shouldSend)
            {
                return;
            }

            _chirperMessageSender.SendMessage(
                _grumpyEngine.GetRandomName(message.senderName),
                _grumpyEngine.GetRandomResponse(message));
        }
예제 #3
0
 public void OnLevelLoaded(LoadMode mode)
 {
     _chirperMessageSender.SendMessage(
         _grumpyEngine.GetRandomName(),
         _grumpyEngine.GetRandomMessage(GrumpinessTrigger.LevelLoaded));
 }