void RpcMovePlayerToNextRoom(GameObject player) { CollisionHandler col = player.GetComponent <CollisionHandler>(); CollisionHandlerLocal lcol = player.GetComponent <CollisionHandlerLocal>(); if (col) { col.ToggleInteractivity(false); } else { lcol.ToggleInteractivity(false); } //teleport to boss Vector3 spawnPt = bossRoom.transform.position + new Vector3(0, 8, 0); player.transform.position = spawnPt; if (col) { col.ToggleInteractivity(true); } else { lcol.ToggleInteractivity(true); } }
// Start is called before the first frame update void Start() { mvr = GetComponent <PlayerMovement>(); if (!mvr) { lmvr = GetComponent <PlayerMovementLocal>(); } slash = GetComponent <Slasher>(); if (!slash) { lslash = GetComponent <SlasherLocal>(); } colHand = GetComponent <CollisionHandler>(); if (!colHand) { lcolHand = GetComponent <CollisionHandlerLocal>(); } rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); achievements = AcheivementScript.Instance; }