Beispiel #1
0
    // TELEPORTS THE PLAYER TO THE OPOSITE PORTAL //
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") && isClosed == false)
        {
            OnPortalActivated.Raise();
            FieldEventManager.ChangeField(ElementType);
            GameObject go = Instantiate(PortalExplodeEffect, (this.transform));
            go.transform.localPosition += Offset;

            //TO DO: VISUAL LOCKING OF THE PORTALS!!!
            other.attachedRigidbody.MovePosition(teleportPad.position);
            other.GetComponent <UnitHealthController>().Energize(6);

            isClosed = true;
            isUsed   = true;
            //  PortalManager.LockPortals();
            //PortalManager.PortalTriggered(this.FieldType);
        }
    }
Beispiel #2
0
 public Field(int fieldID)
 {
     FieldID      = fieldID;
     EventManager = new FieldEventManager(this);
 }
Beispiel #3
0
 public Field()
 {
     EventManager = new FieldEventManager(this);
 }