Beispiel #1
0
 private void CreateBlueprints()
 {
     for (int i = 0; i < 5; i++)
     {
         BlueprintPickupBehaviour newBlueprint = Instantiate <BlueprintPickupBehaviour>(blueprintPrefab);
         newBlueprint.transform.position = new Vector3(0, -10, 0);
     }
 }
Beispiel #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.transform.tag == "Pickup")
     {
         Debug.Log("Collider");
         BlueprintPickupBehaviour behaviour = other.GetComponent <BlueprintPickupBehaviour>();
         behaviour.PickedUp();
         behaviour.ResetPosition();
         GameController.GotBlueprint();
     }
     if (other.transform.tag == "Floor")
     {
         GameController.CrashFloor();
     }
 }