// 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); } }
public Field(int fieldID) { FieldID = fieldID; EventManager = new FieldEventManager(this); }
public Field() { EventManager = new FieldEventManager(this); }