|
@@ -94,16 +94,24 @@ namespace GFGGame
|
|
{
|
|
{
|
|
void UpdateDialogPicAlpha(object param)
|
|
void UpdateDialogPicAlpha(object param)
|
|
{
|
|
{
|
|
- Color c = spr.color;
|
|
|
|
- if (spr.enabled && c.a < 1f)
|
|
|
|
|
|
+ if(spr != null)
|
|
{
|
|
{
|
|
- c.a += 0.05f;
|
|
|
|
- spr.color = c;
|
|
|
|
|
|
+ Color c = spr.color;
|
|
|
|
+ if (spr.enabled && c.a < 1f)
|
|
|
|
+ {
|
|
|
|
+ c.a += 0.05f;
|
|
|
|
+ spr.color = c;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ FairyGUI.Timers.inst.Remove(UpdateDialogPicAlpha);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
FairyGUI.Timers.inst.Remove(UpdateDialogPicAlpha);
|
|
FairyGUI.Timers.inst.Remove(UpdateDialogPicAlpha);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
var resPath = ResPathUtil.GetNpcPicSPath(value);
|
|
var resPath = ResPathUtil.GetNpcPicSPath(value);
|
|
Sprite sp = GFGAsset.Load<Sprite>(resPath);
|
|
Sprite sp = GFGAsset.Load<Sprite>(resPath);
|