Beispiel #1
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerRB   = GetComponent <Rigidbody2D>();
     anim       = GetComponent <Animator>();
     spobject   = FindObjectOfType <SpawnManagerScript>();
     background = GameObject.Find("Background").GetComponent <RepeatBackground>();
     ground     = GameObject.Find("Ground").GetComponent <RepeatBackground>();
     ground1    = GameObject.Find("BottomGround").GetComponent <RepeatBackground>();
 }
 // Start is called before the first frame update
 void Start()
 {
     button           = GetComponent <Button>();
     playerController = GameObject.Find("Player").GetComponent <PlayerController>();
     moveLeft         = GameObject.Find("Crate_01").GetComponent <MoveLeft>();
     spawnManager     = GameObject.Find("Spawn Manager").GetComponent <SpawnManager>();
     repeatBackground = GameObject.Find("Background").GetComponent <RepeatBackground>();
     button.onClick.AddListener(SetDifficulty);
 }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     playerRB       = GetComponent <Rigidbody2D>();
     playerSprite   = GetComponent <SpriteRenderer>();
     anim           = GetComponent <Animator>();
     background     = GameObject.Find("Background").GetComponent <RepeatBackground>();
     playaudio      = GameObject.Find("Player").GetComponent <AudioSource>();
     playaudio.clip = mainclip;
     scobj          = FindObjectOfType <ScoreScript>();
 }