Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         fCon.Attack();
     }
     if (Input.GetKeyDown(KeyCode.D))
     {
         Destroy(fCon.gameObject);
         fCon = null;
     }
     if (Input.GetKeyDown(KeyCode.I))
     {
         if (!fCon)
         {
             fCon = Instantiate(fighter).GetComponent <FighterController>();
         }
     }
 }