using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KillFeed_Generator : MonoBehaviour
{
public string characterName = "Joe";//Store a character name for the persn who is killed.
public string deathBy = "a mean comment";//Store the way the character dies
private string deathText;
// Death text ca;;s pir DeathGenerator method and passes through a name and a death.
void Start()
{
deathText = DeathGenerator(characterName, deathBy);
Debug.Log(deathText);
}
// Update is called once per frame
void Update()
{
}
//This is a method that returns a string. It requires two strings to be passed into it.
private string DeathGenerator(string name, string death)
{
string tempText;
tempText = name + " died to " + death;
return tempText;
}
}
Comentários
Postar um comentário