Exemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    public bool PlayShake(int type)
    {
        XCameraConfigure conf = XCameraHelper.confPvp;

        if (!IsPvp())
        {
            conf = XCameraHelper.confPve;
        }

        if (!conf || conf.myShakes.Count < type)
        {
            return(false);
        }

        XCameraShake shake = XCameraShake.GetSingleton();

        if (shake && shake.isActiveAndEnabled)
        {
            shake.DoShake(conf.myShakes[type - 1].numberOfShakes,
                          conf.myShakes[type - 1].shakeAmount,
                          conf.myShakes[type - 1].rotationAmount,
                          conf.myShakes[type - 1].distance,
                          conf.myShakes[type - 1].speed,
                          conf.myShakes[type - 1].decay,
                          conf.myShakes[type - 1].guiShakeMod,
                          conf.myShakes[type - 1].multiplyByTimeScale);
        }

        return(true);
    }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 private void Awake()
 {
     instance = this;
 }