Beispiel #1
0
 public void Initialize(Transform _anchor, Transform _currentLevel)
 {
     //Links the anchor to the one in the current level
     anchor = _anchor;
     //Sets the parent object tio the current level
     transform.parent = _currentLevel;
     //Sets the initial position of the orb to that of thge anchor
     transform.position = anchor.position;
     //sets a script reference to the currentLevel
     CurrentLevel = _currentLevel.gameObject.GetComponent <Scr_Level>();
 }
 void FindCurrentLevel()
 {
     CurrentLevel = FindObjectOfType <Scr_Level>();
 }