hello programmers… im making a project for school… but im stuck with something.
and the problem is that i make buttons for an status system but its not working…
can somebody help me with this.
( im very new with C#… i stept over to the C# camp)
the code :
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Rendering;
using System.Collections;
public class StatusSystem : MonoBehaviour {
public bool StatusOnline = false;
public bool StatusAway = false;
public bool StatusOffline = false;
public RawImage StatusImage;
public Color ColorOnline;
public Color ColorAway;
public Color ColorOffline;
void Start()
{
StatusOnline = false;
}
public void StatusOnline_f(RawImage RawImage)
{
StatusOnline = true;
StatusAway = false;
StatusOffline = false;
if(StatusOnline == true)
{
GetComponent<RawImage>().color = ColorOnline;
}
}
public void StatusAway_f(RawImage RawImage)
{
StatusAway = true;
StatusOffline = false;
StatusOnline = false;
if(StatusAway == true)
{
GetComponent<RawImage>().color = ColorAway;
}
}
public void StatusOffline_f(RawImage RawImage)
{
StatusOffline = true;
StatusOnline = false;
StatusAway = false;
if(StatusOffline == true)
{
GetComponent<RawImage>().color = ColorOffline;
}
}
}
if somebody could help me with this i would like to say thanks.