Пример #1
0
 void Update()
 {
     if (target.Get_InRadius() != nowNum)
     {
         gameObject.SetActive(false);
     }
 }
Пример #2
0
 private void Start()
 {
     target  = GameObject.Find("GameMaster").GetComponent <Target_Manager>();
     Charger = GameObject.Find("Charger");
     hand    = transform.GetChild(1).gameObject;
     nowNum  = target.Get_InRadius();
 }
Пример #3
0
 void Start()
 {
     target = GameObject.Find("GameMaster").GetComponent <Target_Manager>();
     if (target != null)
     {
         nowNum = target.Get_InRadius();
     }
 }
Пример #4
0
    private void Update()
    {
        if (!IsEnteredTheSlot)
        {
            if (GameMaster.instance.stageState == GameMaster.StageState.PLAYING)
            {
                Movement();         //移動処理
            }
        }
        else
        {
            MyRigidbody.velocity = Vector3.zero;
            transform.position   = Vector3.MoveTowards(transform.position, snapTargetPos.transform.position, 0.01f);
        }

        //スマホを越えてしまったらゲームオーバー
        if (transform.position.z > -7.53f && isGameOverCheck)
        {
            GM.SetStageState(GameMaster.StageState.STAGEFAILURE);
            isGameOverCheck = false;
        }
        //リングを越えてしまったらゲームオーバー
        if (circleCnt < 7)
        {
            if (transform.position.z > circleObjcts[circleCnt].transform.position.z && isGameOverCheck)
            {
                GM.SetStageState(GameMaster.StageState.STAGEFAILURE);
                isGameOverCheck = false;
            }
        }

        if (target.Get_InRadius() != nowNum)
        {
            Instantiate(cornerPrefab, cornerpoint.transform.position, Quaternion.identity);
            nowNum = target.Get_InRadius();
        }
    }