private void ActivateMech(GameObject other)
    {
        grabbed          = true;
        parent           = transform.parent;
        transform.parent = other.transform;
        PickUpEventInfo amei = new PickUpEventInfo(gameObject, "Sending an activate mech event", hand);

        EventCoordinator.ActivateEvent(amei);
    }
Exemplo n.º 2
0
    private void FirePickUpEvent(GameObject player)
    {
        TransformEventInfo tei = new TransformEventInfo(player.transform.position, Quaternion.identity, pickUpEffects[GameController.Instance.FindPlayerByGameObject(player).ID]);

        EventHandler.Instance.FireEvent(EventHandler.EventType.ParticleEvent, tei);
        SoundEventInfo sei = new SoundEventInfo(pickUpSound, 0.4f, 1);

        EventHandler.Instance.FireEvent(EventHandler.EventType.SoundEvent, sei);
        PickUpEventInfo pei = new PickUpEventInfo(gameObject, player);

        EventHandler.Instance.FireEvent(EventHandler.EventType.PickUpEvent, pei);
    }
Exemplo n.º 3
0
    private void MechActivation(EventInfo ei)
    {
        PickUpEventInfo puei = (PickUpEventInfo)ei;

        if (puei.Hand == leftHand)
        {
            leftActive = true;
        }
        else if (puei.Hand == rightHand)
        {
            rightActive = true;
        }
    }
Exemplo n.º 4
0
    private void RegisterPickUp(BaseEventInfo e)
    {
        PickUpEventInfo pei = e as PickUpEventInfo;

        if (pei != null)
        {
            GameObject pickUp = pei.PickedUpObject;
            GameObject player = pei.PlayerThatPickedUp;
            int        pts    = pickUp.GetComponent <PickUp>().Points;
            AssignPoints(player, pts);
            Player p      = GameController.Instance.FindPlayerByGameObject(player);
            var    points = new Dictionary <Player, int>();
            points.Add(p, pts);
            MinigameController.Instance.MinigamePointSystem.UpdateScore(points);
            UpdatePlayerScoreEventInfo updateEventInfo = new UpdatePlayerScoreEventInfo()
            {
                Player = player, Score = playerScore[player]
            };
            EventHandler.Instance.FireEvent(EventHandler.EventType.UpdateScoreEvent, updateEventInfo);
        }
    }