// Use this for initialization void Start() { listDialog.Add(Resources.Load <Sprite> ("1_prep")); listDialog.Add(Resources.Load <Sprite> ("2_prep")); listDialog.Add(Resources.Load <Sprite> ("3_prep")); listDialog.Add(Resources.Load <Sprite> ("4_prep")); listDialog.Add(Resources.Load <Sprite> ("5_prep")); textDialog.sprite = listDialog [0]; bt_AddAmostra.SetActive(false); bt_HomogenizeBecker.SetActive(false); bt_Alcool.SetActive(false); bt_Funil.SetActive(false); bt_BeckerBaloon.SetActive(false); bt_PissetaBallon.SetActive(false); bt_funilOut.SetActive(false); bt_coverBaloon.SetActive(false); bt_Homogenize.SetActive(false); bt_removeCover.SetActive(false); bt_baloonToBecker.SetActive(false); prepare = PrepareState.step0; flag = true; }
public IEnumerator Prepare(Material azureKinectScreenMaterial, VideoSenderMessage videoMessage) { if (State != PrepareState.Unprepared) { throw new Exception("State has to be Unprepared to prepare TextureGroupUpdater."); } State = PrepareState.Preparing; textureSet.SetWidth(videoMessage.width); textureSet.SetHeight(videoMessage.height); TelepresenceToolkitPlugin.InitTextureGroup(textureSet.GetId()); colorDecoder = new Vp8Decoder(); depthDecoder = new TrvlDecoder(videoMessage.width * videoMessage.height); State = PrepareState.Prepared; while (!textureSet.IsInitialized()) { yield return(null); } // TextureGroup includes Y, U, V, and a depth texture. azureKinectScreenMaterial.SetTexture("_YTex", textureSet.GetYTexture()); azureKinectScreenMaterial.SetTexture("_UvTex", textureSet.GetUvTexture()); azureKinectScreenMaterial.SetTexture("_DepthTex", textureSet.GetDepthTexture()); State = PrepareState.Prepared; }
// Use this for initialization void Start() { god = this; // 静态状态初始化 prepareState = new PrepareState(); emptyState = new EmptyState(); roundExchangeState = new RoundExchangeState(); attackPrepareState = new AttackPrepareState(); attackCompletedState = new AttackCompletedState(); cardSelectedState = new CardSelectedState(); targetSelectedState = new TargetSelectedState(); cardCastedState = new CardCastedState(); gameOverState = new GameOverState(); //UI实例 UI = GameObject.Find("Canvas").GetComponent <UserInterface>(); UI.next_round.onClick.AddListener(delegate() { ExchangeRound(); }); // 设置初始状态 currentState = prepareState; isFree = true; init(); }
public void ChangeState(PrepareState nextState) { switch (state) { case PrepareState.Title: titleGo.SetActive(false); break; case PrepareState.Guide: guideGo.SetActive(false); break; } state = nextState; switch (nextState) { case PrepareState.Title: titleGo.SetActive(true); break; case PrepareState.Guide: guideGo.SetActive(true); break; } }
public IEnumerator SetupTextureGroup(VideoInitSenderPacketData initPacketData) { if (state != PrepareState.Unprepared) { throw new Exception("State has to be Unprepared to prepare TextureGroupUpdater."); } state = PrepareState.Preparing; textureGroup.SetWidth(initPacketData.depthWidth); textureGroup.SetHeight(initPacketData.depthHeight); PluginHelper.InitTextureGroup(textureGroup.GetId()); depthDecoder = new TrvlDecoder(initPacketData.depthWidth * initPacketData.depthHeight); state = PrepareState.Prepared; while (!textureGroup.IsInitialized()) { yield return(null); } // TextureGroup includes Y, U, V, and a depth texture. azureKinectScreenMaterial.SetTexture("_YTex", textureGroup.GetYTexture()); azureKinectScreenMaterial.SetTexture("_UvTex", textureGroup.GetUvTexture()); azureKinectScreenMaterial.SetTexture("_DepthTex", textureGroup.GetDepthTexture()); state = PrepareState.Prepared; }
IEnumerator timeToFinishAnimRotateBalvol() { yield return(new WaitForSeconds(5)); prepare = PrepareState.step9; GameObject.Find("Camera").GetComponent <PathFollow> ().moveToCubeta(); yield break; }
public TextureSetUpdater(int receiverId, IPEndPoint senderEndPoint) { State = PrepareState.Unprepared; this.receiverId = receiverId; this.senderEndPoint = senderEndPoint; textureSet = new TextureSet(); Debug.Log($"textureSet ID: {textureSet.GetId()}"); lastFrameId = -1; }
private PrepareState() { if (_instance != null) { return; } _instance = this; }
public GameController() { prepare = new PrepareState(this, new GameController.Context(this)); playing = new PlayingState(this, new GameController.Context(this)); win = new WinState(this, new GameController.Context(this)); menu = new MenuState(this, new GameController.Context(this)); remember = new RememberState(this, new GameController.Context(this)); repeat = new RepeatState(this, new GameController.Context(this)); fail = new FailState(this, new GameController.Context(this)); }
protected Batch() { var thisType = GetType(); lock (TypeIds) { if (!TypeIds.TryGetValue(thisType, out TypeId)) { TypeIds.Add(thisType, TypeId = TypeIds.Count); } } State = new PrepareState(); }
public void Init(PrepareState initState = PrepareState.Title) { titleGo.SetActive(initState == PrepareState.Title); guideGo.SetActive(initState == PrepareState.Guide); foreach (var avatar in avatarCtrls) { avatar.Reset(); } ChangeState(initState); SoundManager.Instance.Stop("Music_MemoCute"); SoundManager.Instance.Play("Music_HappyVictorious"); }
// Use this for initialization void Start() { god = this; // 静态状态初始化 prepareState = new PrepareState(); emptyState = new EmptyState(); roundExchangeState = new RoundExchangeState(); attackPrepareState = new AttackPrepareState(); attackCompletedState = new AttackCompletedState(); cardSelectedState = new CardSelectedState(); targetSelectedState = new TargetSelectedState(); cardCastedState = new CardCastedState(); gameOverState = new GameOverState(); // 设置初始状态 currentState = prepareState; isFree = true; init(); }
public TextureGroupUpdater(Material azureKinectScreenMaterial, int sessionId, IPEndPoint endPoint) { state = PrepareState.Unprepared; this.azureKinectScreenMaterial = azureKinectScreenMaterial; textureGroup = new TextureGroup(); UnityEngine.Debug.Log($"textureGroup id: {textureGroup.GetId()}"); lastVideoFrameId = -1; videoMessages = new Dictionary <int, VideoSenderMessageData>(); frameStopWatch = Stopwatch.StartNew(); //textureGroup.SetWidth(initPacketData.depthWidth); //textureGroup.SetHeight(initPacketData.depthHeight); //PluginHelper.InitTextureGroup(textureGroup.GetId()); colorDecoder = new Vp8Decoder(); //depthDecoder = new TrvlDecoder(initPacketData.depthWidth * initPacketData.depthHeight); this.sessionId = sessionId; this.endPoint = endPoint; }
public void beckerToBaloonAnim(int speed) { GameObject.Find("becker_model").GetComponent <Animator> ().SetFloat("speed", speed); prepare = PrepareState.step5; flag = true; }
public void addCoverToBaloon() { cover.SetActive(true); prepare = PrepareState.step8; }
public void pissetaToBaloonAnim(int speed) { GameObject.Find("Pisseta_table").GetComponent <Animator> ().SetFloat("speed2", speed); prepare = PrepareState.step6; flag = true; }
public void setStepTo7() { prepare = PrepareState.step7; }
public void removeCoverFromBaloon() { cover.SetActive(false); prepare = PrepareState.step10; }
private void Initialize() { SurfaceTextureListener = this; _mp = new MediaPlayer(); InitMediaController(); _mp.Error += (sender, e) => { if (_state == PrepareState.Ready) { e.Handled = true; return; } _errorCount++; if (_errorCount == 3) { Log.Warn(NTag, string.Format("Failed to Prepare MediaPlayer:{0} trys", _errorCount)); return; } if (_state != PrepareState.Preparing) { _state = PrepareState.None; Prepare(); } }; }
private void Prepare() { if (_state == PrepareState.Preparing || _state == PrepareState.Ready) return; ThreadPool.QueueUserWorkItem(_ => { try { _state = PrepareState.Preparing; _mp.Prepare(); _state = PrepareState.Ready; if (_shouldStart) { _shouldStart = false; Start(); } } catch (Exception ex) { _state = PrepareState.None; Log.Warn(NTag, "Failed to prepapre MediaPlayer:{0}", ex.StackTrace); } }); }
public void addSolidToSolve() { solid.SetActive(true); prepare = PrepareState.step1; }
public void solveSolutionAnim(int speed) { GameObject.Find("Pisseta_table").GetComponent <Animator> ().SetFloat("speed", speed); prepare = PrepareState.step2; flag = true; }
public void homogenizeBeckerAnim(int speed) { GameObject.Find("becker_model").GetComponent <Animator> ().SetFloat("speed_rotate", speed); prepare = PrepareState.step3; flag = true; }
public void funilAnim(int speed) { GameObject.Find("funnel_glass").GetComponent <Animator> ().SetFloat("speed", speed); prepare = PrepareState.step4; flag = true; }
public override void Initialize() { state = new PrepareState( Game, this ); Game.Components.Add( state ); base.Initialize(); }