// public void OnSwitchThought() // { // if (isThoughtOn) { // thoughtBackground.transform.DOKill (); // thoughtBackground.transform.DOScale (0, 0.3f).OnComplete (delegate() { // isThoughtOn = false; // }); // } else { // thoughtBackground.transform.DOKill (); // thoughtBackground.transform.DOScale (1f, 0.3f).OnComplete (delegate() { // isThoughtOn = true; // }); // // } // } void OnStateChange(LogicManager.GameState fromState, LogicManager.GameState toState) { if (toState == LogicManager.GameState.ShowCredit) { // ending.DOScale (0.01f, 1f).From (); endingBack.DOFade(0.45f, 2f); endingBack.DOFade(1f, 5f).SetDelay(25f); endingCredit.transform.DOMoveY(1600f, 30f).OnComplete(delegate() { M_Event.FireLogicEvent(LogicEvents.EndCredit, new LogicArg(this)); }); ending.gameObject.SetActive(true); } else if (toState == LogicManager.GameState.BeginShip) { HideMusicPlayer(0.3f); } // Debug.Log ("On Change" + toState); // foreach (StateTargetPair pair in targetList) { // if (toState == pair.state) { // targetText.DOKill (); // targetText.text = ""; // targetText.DOText (pair.target, 2f ); // // return; // } // } // targetText.text = ""; }
void OnStateChange(LogicManager.GameState fromState, LogicManager.GameState toState) { Debug.Log("Death " + toState); if (toState == beginState) { StartDeath(); } else if (toState == endState) { gameObject.SetActive(false); } }
void SetActive(LogicManager.GameState state) { bool to = (state >= startState && state < endState) ? setActiveTo : !setActiveTo; foreach (GameObject obj in targetGameObjects) { if (obj != null) { obj.SetActive(to); } } }
void OnStateChange(LogicManager.GameState fromState, LogicManager.GameState toState) { // Debug.Log("To state effect" + toState); // if ( toState == LogicManager.GameState.WalkInStreetColorful ) // { // saturationEffect.enabled = true; // saturationEffect.Brightness = 1f; // saturationEffect.Contrast = 1f; // DOTween.To (() => saturationEffect.Saturation, (x) => saturationEffect.Saturation = x, 2f, 30f); // } Debug.Log("To state effect" + toState); if (toState == LogicManager.GameState.BeginShip) { photoShopEffect.enabled = true; DOTween.To(() => photoShopEffect.FadeFX, (x) => photoShopEffect.FadeFX = x, 0.3f, 15f); } }
void OnStateChange(LogicManager.GameState fromState, LogicManager.GameState toState) { // Debug.Log ("To state " + toState); thoughtsForState.Clear(); foreach (Thought thought in preloadThoughtList.thoughtList) { if (thought.state == toState || thought.state == LogicManager.GameState.EveryState) { thoughtsForState.Add(thought); } } foreach (Thought thought in enterStateThoughtList.thoughtList) { if (thought.state == toState) { SendThought(thought); } } ResetTiredTime(); }