コード例 #1
0
ファイル: SCamera.cs プロジェクト: LatestMatrix/rpg1
 public void StopShake()
 {
     if (_tsp != null)
     {
         _tsp.enabled = false;
         _tsp         = null;
     }
 }
コード例 #2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenShakePosition Begin(GameObject go, float duration, Vector3 range)
    {
        TweenShakePosition comp = UITweener.Begin <TweenShakePosition>(go, duration);

        comp.range = range;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        comp.style  = UITweener.Style.PingPong;
        comp.method = UITweener.Method.BounceInOut;
        return(comp);
    }
コード例 #3
0
ファイル: SCamera.cs プロジェクト: LatestMatrix/rpg1
 public void StartShake(float durationTime = 1f)
 {
     Timer.AddTimer(StopShake, durationTime);
     _tsp = TweenShakePosition.Begin(gameObject, 0.3f, new Vector3(0, 0.1f, 0));
 }