예제 #1
0
    /// <summary>
    /// 明るくする
    /// </summary>
    /// <returns></returns>
    IEnumerator FadeIN()
    {
        // 念のため初期化
        _fadeUI.color = myColor;
        alpha         = _fadeUI.color.a;
        if (null != _load)
        {
            _load.Reload();
        }
        while (0 < _fadeUI.color.a)
        {
            _fadeUI.color = new Color(_fadeUI.color.r, _fadeUI.color.g, _fadeUI.color.b, alpha);
            alpha        -= Time.deltaTime / fadeInSpeed;
            yield return(null);
        }
        yield return(new WaitForSeconds(1));

        if (null != _gm)
        {
            _gm.SetGameState(GameManager.GameState.Main);
        }
        // ループを抜けたらcallback
        if (_callback != null)
        {
            _callback();
        }
    }
예제 #2
0
    void Shoot(Vector2 localUp)
    {
        Instantiate(nextBullet, transform.position + new Vector3(localUp.x, localUp.y, 0.0f) * 0.5f, transform.rotation);
        timer = 0.0f;
        rb.AddForce(-localUp * ShootingKick);
        playerReload.Reload();
        soundManager.PlayShoot();

        nextBullet = Bullet;
    }