Jump to content
Unity Insider Forum

AWD04

Newbie
  • Gesamte Inhalte

    1
  • Benutzer seit

  • Letzter Besuch

AWD04's Achievements

Newbie

Newbie (1/3)

0

Ansehen in der Community

  1. Hallo Leute; Habe ein Brett vorm Kopf, Bitte um Hilfe. Per "InputFielt" soll eine Zahl eingegeben werden, die ich bei "Global.ammo" weiterverarbeiten möchte. Wenn ich es ohne "InputField" mache, geht es. Muss es aber mit machen. Bitte Hilfe. Danke im Voraus. ____________________________________________________________________ using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; public class NewAmmo : MonoBehaviour { public InputField nameField; // Munition Input Field // private int M1= 50; void OnTriggerEnter() { M1 = nameField.ToString(); // ?????????? (FALSCH) Global.ammo = Global.ammo + M1; // Anfangsmunition + Munition aus den Kisten Destroy(gameObject); // Munitions Kiste aufnehmen und löschen } }
×
×
  • Neu erstellen...