private void Start()
 {
     // Get the player and sandstorm original position
     playerSpawnPosition    = new Vector2(player.transform.position.x, player.transform.position.y);
     sandStormSpawnPosition = new Vector2(sandStorm.transform.position.x, sandStorm.transform.position.y);
     playerController       = player.GetComponent <PlayerController>();
     point1          = point.GetComponent <Point>();
     sandStorm1      = sandStorm.GetComponent <SandStorm>();
     backgroundSpawn = backgroundSpawner.GetComponent <BackGroundSpawner>();
 }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     text             = gameObject.GetComponent <Text>();
     playerController = player.GetComponent <PlayerController>();
     sand             = sandStorm.GetComponent <SandStorm>();
 }