PBG2H23ABR_PBG2H23AKL_PMC_P.../Plunderblock/Assets/UI_Manager.cs

31 lines
672 B
C#
Raw Normal View History

2024-06-28 11:24:09 +02:00
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
2024-06-28 11:24:09 +02:00
using UnityEngine;
using UnityEngine.UI;
public class UI_Manager : MonoBehaviour
{
private Text anzahlKills;
2024-06-28 11:24:09 +02:00
private Transform canvas;
2024-06-28 11:24:09 +02:00
public void killCount(int addedScore){
int summe = int.Parse(anzahlKills.text) + addedScore;
anzahlKills.text = "" + summe;
}
2024-06-28 11:24:09 +02:00
void Start()
{
canvas = this.gameObject.GetComponentInChildren<Transform>();
anzahlKills = canvas.GetComponentInChildren<Text>();
anzahlKills.text = "0";
2024-06-28 11:24:09 +02:00
}
// Update is called once per frame
void Update()
{
}
}