예제 #1
0
 public void Smashing()
 {
     if (!IsSmashStarted)
     {
         IsSmashStarted = true;
         return;
     }
     if (OnController() == ControlStatus.Smash)
     {
         manager.AllSmashing(controller.TouchPoint);
         se.SeChanger(2);
         se.Play();
         SmashCount = 0;
         ImageChanged();
         fallStopper.SetActive(true);
         IsSmashStarted = false;
     }
 }
예제 #2
0
 private void Moving()
 {
     SetSpeed();
     //落下したら
     if (wallHitter.IsHit(gameObject, HitPointFlag.Bottom))
     {
         FallOut();
     }
     if (wallHitter.IsHit(gameObject, HitPointFlag.Left | HitPointFlag.Right | HitPointFlag.Top))
     {
         se.Play();
     }
 }
예제 #3
0
 private void BallSet(bool isStarted = false)
 {
     if (!isStarted)
     {
         if (gameManager.GameState == GameManager.GameStatus.GameOver || gameManager.RequestGameState == GameManager.GameStatus.GameOver)
         {
             return;
         }
         se.Play();
         bool flag = gameManager.LostLife(); //ライフを減らす処理
         if (flag)
         {
             return;
         }
         gameManager.RequestGameState = GameManager.GameStatus.Wait;
         bar.ResetScale();       //バーのサイズをリセット
         goddess.transform.position = new Vector2(0, goddess.transform.position.y);
         goddess.IsStoped           = true;
     }
     Instantiate(ballPrefab, goddess.FirstPosition, Quaternion.identity);
 }
예제 #4
0
 private void Moving()
 {
     //EndTime秒間画面をスクロールする
     timer += Time.deltaTime;
     Scroll();
     if (timer > moveEndTime)
     {
         timer = 0.0f;
         if (enemyManager.LastEnemies())
         {
             ScrollCanvas.SetActive(true);
             se.Play();
             state = Status.Warning;
         }
         else
         {
             state = Status.Stopping;
             manager.RequestGameState = GameManager.GameStatus.Wait;
         }
     }
 }
예제 #5
0
    // Update is called once per frame
    void Update()
    {
#if UNITY_EDITOR
        //タップに関する何か
        if (Input.GetMouseButtonDown(0))
        {
            if (!BackGroundIsTaped(backGoround))
            {
                return;
            }
            State          = Status.Pushed;
            TouchMovePoint = TouchPoint = mainCamera.ScreenToWorldPoint(Input.mousePosition);
            se.Play();
        }
        else if (Input.GetMouseButtonUp(0))
        {
            State = Status.Released;
        }
        else if (Input.GetMouseButton(0))
        {
            if (TouchMovePoint != (Vector2)Input.mousePosition)
            {
                if (!BackGroundIsTaped(backGoround))
                {
                    return;
                }
                State          = Status.PressingMove;
                TouchMovePoint = mainCamera.ScreenToWorldPoint(Input.mousePosition);
            }
            else
            {
                State = Status.Pressing;
            }
        }
        else
        {
            State = Status.Free;
        }
#elif UNITY_ANDROID || UNITY_IPHONE
        if (Input.touchCount > 0)
        {
            //タップに関する何か
            if (Input.touches[0].phase == TouchPhase.Began)
            {
                if (!BackGroundIsTaped(backGoround))
                {
                    return;
                }
                State          = Status.Pushed;
                TouchMovePoint = TouchPoint = mainCamera.ScreenToWorldPoint(Input.touches[0].position);
                se.Play();
            }
            else if (Input.touches[0].phase == TouchPhase.Moved)
            {
                if (!BackGroundIsTaped(backGoround))
                {
                    return;
                }
                State          = Status.PressingMove;
                TouchMovePoint = mainCamera.ScreenToWorldPoint(Input.touches[0].position);
            }
            else if (Input.touches[0].phase == TouchPhase.Stationary)
            {
                State = Status.Pressing;
            }
            else if (Input.touches[0].phase == TouchPhase.Ended)
            {
                State = Status.Released;
            }
        }
        else
        {
            State = Status.Free;
        }
#endif
    }
예제 #6
0
파일: Title.cs 프로젝트: ry-rise/Hero
 public void OnClick()
 {
     tap.Play();
     manager.NextLevelSelect();
 }
예제 #7
0
 public void Select(int level)
 {
     GameManager.SelectLevel = level;
     tap.Play();
     SceneManager.LoadScene("Stage1");
 }
예제 #8
0
파일: DeadSe.cs 프로젝트: ry-rise/Hero
 // Use this for initialization
 void Start()
 {
     se.Play();
 }