Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class KillFeed : MonoBehaviour {
- //public string communication;
- public static KillFeed KF;
- public List<string> killFeed = new List<string>();
- // Use this for initialization
- void Start () {
- }
- [RPC]
- void Dead(string guy1, string guy2){
- killFeed.Add(guy1 + " killed " +guy2);
- if (killFeed.Count >= 3) killFeed.RemoveAt(0);
- }
- // Update is called once per frame
- void Update () {
- }
- void OnGUI()
- {
- GUILayout.BeginArea(new Rect(780, 10, 300, 100));
- foreach(string kf in killFeed)
- {
- GUILayout.Label(kf);
- }
- GUILayout.EndArea ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement