コード例 #1
0
ファイル: GPUGraph.cs プロジェクト: KyrieWei/CatlikeCoding
 void PickNextFunction()
 {
     function = transitionMode == TransitionMode.Cycle ?
                FunctionLibrary.GetNextFunctionName(function) :
                FunctionLibrary.GetRandomFunctionNameOtherThan(function);
 }
コード例 #2
0
 protected override int GetFirstColumn()
 {
     return(FunctionLibrary.GetExcelColumn(Resource.ExcelColumn_ASS_Totals_First_FIG));
 }
コード例 #3
0
 protected override int GetLastColumn()
 {
     return(FunctionLibrary.GetExcelColumn(Resource.ExcelColumn_ASS_Totals_Last_LET));
 }
コード例 #4
0
 // Purchase page methods.
 public void SelectSearchValue(string SearchValue)
 {
     FunctionLibrary.SelectDropdown(SearchDropdown, SearchValue);
 }
コード例 #5
0
 private void PickNextFunction()
 {
     function = transitionMode == TransitionMode.Cycle ?
                FunctionLibrary.GetNextFunctionEnum(function) :
                FunctionLibrary.GetRandomFunctionEnumOtherThan(function);
 }
コード例 #6
0
    //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));
        }
    }
コード例 #7
0
 /// <summary>
 ///  销毁某个物体上的某个事件;
 /// </summary>
 /// <param name="jsonData"></param>
 /// <returns></returns>
 public bool OffEvent(JsonData jsonData)
 {
     return(FunctionLibrary.OffEvent(jsonData[1].ToString(), jsonData[2].ToString()));
 }
コード例 #8
0
 /// <summary>
 ///  显示 JsonData 中的一系列物体;
 /// </summary>
 /// <param name="jsonData"></param>
 /// <returns></returns>
 private bool Display(JsonData jsonData)
 {
     return(FunctionLibrary.Display(jsonData));
 }
コード例 #9
0
 public virtual StaticContextBuilder withFunctionLibrary(string @namespace, FunctionLibrary fl)
 {
     _functionLibraries[@namespace] = fl;
     return(this);
 }
コード例 #10
0
    private void Awake()
    {
        m_Rigidbody = FunctionLibrary.GetIfNull(gameObject, m_Rigidbody);

        m_GrappleObject = GameObject.Instantiate(m_GrapplingHookPrefab).transform;
    }