62 lines
1.6 KiB
C#
62 lines
1.6 KiB
C#
using cfg;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace game
|
|
{
|
|
public class WashingGameSprayFoam : WashingGamePainting
|
|
{
|
|
#region 事件
|
|
protected override void StartConclusion(EventWashingConclusionData data)
|
|
{
|
|
if (m_PaintTexture != null)
|
|
{
|
|
SetPaintTextureColor(Color.white, true);
|
|
}
|
|
base.StartConclusion(data);
|
|
}
|
|
#endregion
|
|
|
|
#region 页面功能
|
|
protected override void InitPanel()
|
|
{
|
|
base.InitPanel();
|
|
// 关闭笔刷填充进度
|
|
panel.ResetBrushChannelCounterFillAndInverse(false, true);
|
|
|
|
this.StartCoroutine(StartCountingFill());
|
|
}
|
|
|
|
private IEnumerator StartCountingFill()
|
|
{
|
|
int index = 0;
|
|
while (index < 10)
|
|
{
|
|
yield return null;
|
|
index++;
|
|
}
|
|
|
|
panel.StartCountingFill();
|
|
}
|
|
#endregion
|
|
|
|
#region 生命周期
|
|
public override void InitGame(string name)
|
|
{
|
|
base.InitGame(name);
|
|
this.m_GameType = EventWashingOperation.Foaming;
|
|
}
|
|
|
|
public override void Fresh(EventWashingDataManager dataManager)
|
|
{
|
|
SetPaintTextureColor(new Color(1f, 1f, 1f, 0f));
|
|
ChangePaintSphereBlendModeToAdditiveSoft();
|
|
m_PainterColor = Color.white;
|
|
base.Fresh(dataManager);
|
|
if (m_PaintTexture != null) m_PaintTexture.gameObject.SetActive(true);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|