Jump to content
Unity Insider Forum

Adrian H

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Adrian H's Achievements

Member

Member (2/3)

0

Reputation

  1. Hallo, wie kann man in PUN2 anzeigen lassen welcher Spieler du bist?
  2. Hallo, ich hab ein Spieler der nach jedem Schuss ein kleinen Cooldown hat ich wollte den Cooldown an einer Progress Bar/ Time Bar anzeigen lassen jedoch geht die Anzeige erst nach unten wenn der Cooldown schon abgelaufen ist.bzw startet viel zu spät für die Progressbar public class progressbar : MonoBehaviour { public int minimum; public int maximum; public int current; public Image mask; public Joystick joystickscript; void Update() { mask.fillAmount = joystickscript.cooldowntimer; } void Getfill() { float currentOffset = current - minimum; float maximumoffset = maximum - minimum; float fillAmount = currentOffset / maximumoffset; } } Für die den Cooldownr: public float cooldown = 5; public float cooldowntimer; void Update() { if (cooldowntimer > 0) { cooldowntimer -= Time.deltaTime; } if (cooldowntimer < 0) { cooldowntimer = 0; } } public void OnPointerUp(PointerEventData eventData) { if (cooldowntimer == 0) { playermove.shoot(); cooldowntimer = cooldown; } } Danke im voraus
  3. Hallo, ich möchte von einem anderem Skript eine Variable bekommen. Ich habe es ganz normal so probiert: public Joystick shootstick; shootstick = GameObject.Find("Player").GetComponent<Joystick>(); dabei kommt aber dieser Fehler: Object reference not set to an instance of an object Das Objekt mit dem Skript ist in einem Canvas liegt es vielleicht daran oder an einer anderen Sache? Danke im vorraus
  4. Hallo, wenn ich ein Objekt was mit einem anderen verbunden ist drehen möchte verformt es sich bzw. wird lang.
×
×
  • Create New...