源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
889 B

using UnityEngine.UI;
using UnityEngine;
namespace LuaFramework
{
public class RawImageExtend : RawImage
{
private float _alpha = 1.0F;
public float alpha
{
get { return _alpha; }
set { SetAlpha(value); }
}
private void SetAlpha(float value)
{
_alpha = value;
color = new UnityEngine.Color(color.r, color.g, color.b, _alpha);
}
private bool _gray = false;
public bool gray
{
get { return _gray; }
set { SetGray(value); }
}
private void SetGray(bool value)
{
_gray = value;
if (_gray)
{
material = Resources.Load("material/Gray") as Material;
}
else
{
material = null;
}
}
}
}