Advertisement
Guest User

Wichtelbot v0.1

a guest
May 5th, 2020
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class Wichtelbot : MonoBehaviour
  4. {
  5.   class Wichtel
  6.   {
  7.     public string name;
  8.  
  9.     public Wichtel(string name)
  10.     {
  11.       this.name = name;
  12.     }
  13.   }
  14.  
  15.   private void Start()
  16.   {
  17.     var alleWichtel = new Wichtel[6]
  18.     {
  19.       new Wichtel("Sven"),
  20.       new Wichtel("Karl"),
  21.       new Wichtel("Manu"),
  22.       new Wichtel("Lena"),
  23.       new Wichtel("Patrick"),
  24.       new Wichtel("Nina")
  25.     };
  26.   }
  27.  
  28.   for (var i = 0; i < alleWichtel.Length; i++)
  29.   {
  30.     Debug.Log("Wichtel Nummer " + i + " heißt " + alleWichtel[i].name);
  31.   }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement