/// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> void Start() { tweenValue.TweenCompleted += () => { tweenAngle.Begin(); angleTweenStart = true; }; }
private State getReset(){ State state = TaskState.Create (delegate() { Task task = new TweenTask(delegate() { Tween tween = TweenValue.Begin(this.gameObject, 0.1f, pose_, 0f, delegate(float v) { this.refreshPose(v); }); return tween; }); TaskManager.PushFront(task,delegate() { int idx = offset(this.pose_); if(idx + this._list[0]._index > 0){ idx = -this._list[0]._index; } if(idx + this._list[this._list.Count -1]._index < 0){ idx = -this._list[this._list.Count -1]._index; } for (int i = 0; i < this._list.Count; ++i) { this._list[i]._index += idx; } this.pose_ = this.pose_ - idx * _distance; }); TaskManager.PushBack(task, delegate { this.pose_ = 0; }); return task; }, this.fsm_, "input"); return state; }
public void StartBlink(float duration, Color targetColor) { this.gameObject.SetActive(true); isFinish = false; tweenValue.Begin(); if (StartValue != -1 && EndValue != -1) { tweenValue.startValue = StartValue; tweenValue.endValue = EndValue; } targetLight.intensity = tweenValue.startValue; targetLight.color = targetColor; StartCoroutine(Timer(duration)); }
public void ShowDamageText(int damageNumber) { textDamagedObject.gameObject.SetActive(true); textDamagedObject.text = "-" + damageNumber.ToString(); textDamagedAlpha.Begin(); textDamagedTransform.Begin(); textDamagedAlpha.value = textDamagedAlpha.startValue; textDamagedTransform.vector3Results = textDamagedTransform.startingVector; textDamagedAlpha.TweenCompleted += HideDamageText; }
public void ShowShardGetText(int shardAmount) { textShardGetObject.gameObject.SetActive(true); textShardGetObject.text = "+" + shardAmount.ToString(); textShardGetAlpha.Begin(); textShardGetTransform.Begin(); textShardGetAlpha.value = textShardGetAlpha.startValue; textShardGetTransform.vector3Results = textShardGetTransform.startingVector; textShardGetAlpha.TweenCompleted += HideShardGettext; }
void BrightOnLight() { globalLightIntensity.Begin(); globalLightIntensity.value = globalLightIntensity.startValue; }
void Start() { // -- Camera Init -- // 9 x 16 // 1600 x 900 : cameraOrthogonalInitialSize float screenRatio = (float)Screen.width / (float)Screen.height; float targetRatio = 9f / 16f; if (screenRatio >= targetRatio) { cam.orthographicSize = 160f; } else { float differenceInSize = targetRatio / screenRatio; cam.orthographicSize = 160f * differenceInSize; } // -- Camera Init -- if (PlayerManager.Instance().PlayMode == PLAY_MODE.TRUE) { Show_NormalObject.SetActive(false); Show_Ending1Object.SetActive(true); mainTitle_animatingStart = true; mainTitle_transformTween.Begin(); mainTitle.transform.localPosition = mainTitle_transformTween.startingVector; Btn_Newgame.Begin(); Btn_Newgame.transform.localPosition = Btn_Newgame.startingVector; if (GameConfigs.GetNormalEnding() == true) { Btn_ChangeMode.Begin(); Btn_ChangeMode.transform.localPosition = Btn_ChangeMode.startingVector; } global2DLight.intensity = globalLight2D_intensityBlink.endValue; } else { Show_NormalObject.SetActive(true); Show_Ending1Object.SetActive(false); } if (GameConfigs.GetNormalEnding() == true) { SetChangeModeText(PlayerManager.Instance().PlayMode); } Btn_Newgame.transform.localPosition = Btn_Newgame.startingVector; Btn_ChangeMode.transform.localPosition = Btn_ChangeMode.startingVector; mainTitle.transform.localPosition = mainTitle_transformTween.startingVector; //TopMostControl.Instance().GetController().onPointerDown += OnPointerDown; // Animating light1_intensityTween.TweenCompleted += () => { //if (!isEndAnimating) //{ light1_angleTweenStart = true; light1_outherAngleTween.Begin(); light1_outherAngleTween.value = light1_outherAngleTween.startValue; //} }; light1_outherAngleTween.TweenCompleted += () => { light1_intensityFadeoutStart = true; if (!isEndAnimating) { light1_angleTweenStart = false; global2DLight_blink = true; light1_intensityTweenFadeout.Begin(); light1_intensityTweenFadeout.value = light1_intensityTweenFadeout.startValue; globalLight2D_intensityBlink.Begin(); globalLight2D_intensityBlink.value = globalLight2D_intensityBlink.startValue; } }; light1_intensityTweenFadeout.TweenCompleted += () => { if (!isEndAnimating && !mainTitle_animatingStart) { mainTitle_animatingStart = true; mainTitle_transformTween.Begin(); mainTitle.transform.localPosition = mainTitle_transformTween.startingVector; Btn_Newgame.Begin(); Btn_Newgame.transform.localPosition = Btn_Newgame.startingVector; if (GameConfigs.GetNormalEnding() == true) { Btn_ChangeMode.Begin(); Btn_ChangeMode.transform.localPosition = Btn_ChangeMode.startingVector; } } }; mainTitle_transformTween.TweenCompleted += () => { isEndAnimating = true; TopMostControl.Instance().SettingShowButton.SetActive(true); }; }