Пример #1
0
        public void ConsumeEvent(Event subscribeEvent, object eventPacket)
        {
            switch (subscribeEvent)
            {
            case Event.LISTENING_DEVICE_PLACED:
                ListeningDevicePlacedPacket listeningDeviceData = (ListeningDevicePlacedPacket)eventPacket;
                if (listeningDeviceData.PlacedRoom == transform.GetComponent <Character2D>().CurrentRoom)
                {
                    SeenListeningDevices.Add(listeningDeviceData.Device);
                    Debug.Log(Name.FirstName + " " + Name.LastName + " spotted a listening device!");
                    UpdateTrustValue(((int)(UnityEngine.Random.value * -2)) - 1);
                }

                break;
            }
        }
Пример #2
0
        public void ConsumeEvent(Event subscribeEvent, object eventPacket)
        {
            switch (subscribeEvent)
            {
            case Event.PLACE_LISTENING_DEVICE:
            //Vector3 mousePlacement = (Vector3)eventPacket;
            //MovementAi.CreatePathTo(mousePlacement);
            //break;
            case Event.LEFT_MOUSE_CLICK:
                Vector2 mouseClickPosition = (Vector2)eventPacket;
                if (this.gameObject.GetComponent <Technician>().IsActive == false)
                {
                    break;
                }

                Tasks.AddToStack(new PathfindToLocationTask(new PathfindData
                {
                    Character = this,
                    Location  = mouseClickPosition
                }));
                break;
            }
        }
Пример #3
0
 public void ConsumeEvent(Assets.Scripts.EventSystem.Event subscribeEvent, object eventPacket)
 {
 }