Documentation for the Unity C# Library
Loading...
Searching...
No Matches
FadeTest.cs
Go to the documentation of this file.
1using PixoVR.Fade;
2using System.Collections;
3using System.Collections.Generic;
4using UnityEngine;
5
7{
8 public class FadeTest : MonoBehaviour
9 {
10 [SerializeField]
11 int state;
12 private FadeSerice fadeSerice;
13 // Start is called before the first frame update
14 void Start()
15 {
16 fadeSerice = ServiceLocator.Resolve<FadeSerice>();
17 }
18
19 // Update is called once per frame
20 void Update()
21 {
22 switch (state)
23 {
24 case 1:
25 fadeSerice.FadeIn(()=> { Debug.Log("fadein"); });
26 state = 0;
27 break;
28 case 2:
29 fadeSerice.FadeOut(()=>{ Debug.Log("fadeout"); });
30 state = 0;
31 break;
32 default:
33 break;
34 }
35 }
36 }
37}
int state
[SerializeField]
Definition FadeTest.cs:14
Unity components communication service.