コード例 #1
0
ファイル: ImageColorFade.cs プロジェクト: ADoby/Summoneer
	public void Set(bool value, bool instant = false, NothingDelegate callback2 = null)
	{
		if (value == IsActive)
			return;
		if (value == true && DeactivateWhenFadeDeactive)
		{
			gameObject.SetActive(true);
		}
		IsActive = value;

		if (TransitionTimer.Procentage > 0.05f)
			TransitionTimer.Reset();
		else
			TransitionTimer.Finish();

		if (instant)
		{
			TransitionTimer.Finish();
			UpdateColor(Value);
		}
		callback = callback2;

		if (group)
			group.blocksRaycasts = IsActive;
	}
コード例 #2
0
ファイル: ImageColorFade.cs プロジェクト: ADoby/Summoneer
	public void Reset()
	{
		BG2 = GetComponent<UnityEngine.UI.RawImage>();

		lastValue = -1f;
		callback = null;
		bool wanted2 = IsActive;
		bool wanted = StartAs;
		IsActive = !wanted;
		Set(wanted, true);

		IsActive = !wanted2;
		Set(wanted2, InstantStart);
	}
コード例 #3
0
ファイル: ImageColorFade.cs プロジェクト: ADoby/Summoneer
	public void Show(bool instant = false, NothingDelegate callback2 = null)
	{
		Set(true, instant, callback2);
	}
コード例 #4
0
ファイル: ImageColorFade.cs プロジェクト: ADoby/Summoneer
	public void Hide(bool instant = false, NothingDelegate callback2 = null)
	{
		Set(false, instant, callback2);
	}