void PickNextFunction() { function = transitionMode == TransitionMode.Cycle ? FunctionLibrary.GetNextFunctionName(function) : FunctionLibrary.GetRandomFunctionNameOtherThan(function); }
protected override int GetFirstColumn() { return(FunctionLibrary.GetExcelColumn(Resource.ExcelColumn_ASS_Totals_First_FIG)); }
protected override int GetLastColumn() { return(FunctionLibrary.GetExcelColumn(Resource.ExcelColumn_ASS_Totals_Last_LET)); }
// Purchase page methods. public void SelectSearchValue(string SearchValue) { FunctionLibrary.SelectDropdown(SearchDropdown, SearchValue); }
private void PickNextFunction() { function = transitionMode == TransitionMode.Cycle ? FunctionLibrary.GetNextFunctionEnum(function) : FunctionLibrary.GetRandomFunctionEnumOtherThan(function); }
//Sinks the submarine until it crashes to the sand private void Sink() { float crashDepth = maxDepth - 0.8f; float crashDepthEdge = 0.5f; float distance = this.transform.position.y - crashDepth; //If the sub is too close to minDepth if (distanceToMin < depthEdge) { //Calculate maximum speed at this depth (without this, the sub would leave the gameplay are) newSpeed = maxVerticalSpeed * (minDepth - this.transform.position.y) / depthEdge; //If the newSpeed is greater the the current speed if (newSpeed < speed) { //Make newSpeed the current speed speed = newSpeed; } } //If the distance to the sand is greater than 0.1 if (distance > 0.1f) { //Reduce speed speed -= Time.deltaTime * maxVerticalSpeed * 0.6f; //If the distance to the sand smaller than the crashDepthEdge if (distance < crashDepthEdge) { //Calculate new speed for impact newSpeed = maxVerticalSpeed * (crashDepth - this.transform.position.y) / crashDepthEdge; //If newSpeed is greater than speed if (newSpeed > speed) { //Apply new speed to speed speed = newSpeed; } } //Apply the above to the submarine MoveAndRotate(); //If distance to sand smaller than 0.2 if (distance < 0.25f) { //Enable smoke emission smoke.enableEmission = true; } } //If the distance to the sand is smaller than 0.1 else { //Disable this function from calling, and stop the level playerStatus = PlayerStatus.Crashed; levelManager.StopLevel(); //Disable the smoke StartCoroutine(FunctionLibrary.CallWithDelay(DisableSmoke, 2)); } }
/// <summary> /// 销毁某个物体上的某个事件; /// </summary> /// <param name="jsonData"></param> /// <returns></returns> public bool OffEvent(JsonData jsonData) { return(FunctionLibrary.OffEvent(jsonData[1].ToString(), jsonData[2].ToString())); }
/// <summary> /// 显示 JsonData 中的一系列物体; /// </summary> /// <param name="jsonData"></param> /// <returns></returns> private bool Display(JsonData jsonData) { return(FunctionLibrary.Display(jsonData)); }
public virtual StaticContextBuilder withFunctionLibrary(string @namespace, FunctionLibrary fl) { _functionLibraries[@namespace] = fl; return(this); }
private void Awake() { m_Rigidbody = FunctionLibrary.GetIfNull(gameObject, m_Rigidbody); m_GrappleObject = GameObject.Instantiate(m_GrapplingHookPrefab).transform; }