예제 #1
0
 private void OnMouseDown()
 {
     Root.incrementScore(1);
     anim.SetBool("isClicked", true);
     particles.Emit(this.particleCount);
     FloatingTextController.createFloatingText(1, this.transform);
     shaker.ShakeOnce(20, 40, 1, 1);
 }
예제 #2
0
    IEnumerator GameOver()
    {
        displayTime.enabled = false;
        gameOver            = true;
        cameraShake.ShakeOnce(15, 5, 0, 1);
        audioPlayer.Play();
        Instantiate(gameOverEffect, player.transform.position, Quaternion.identity);
        yield return(new WaitForSeconds(1));

        gameOverText.SetActive(true);
        Time.timeScale = 0;
    }
 static public int ShakeOnce(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 5)
         {
             EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l);
             System.Single a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Single a3;
             checkType(l, 4, out a3);
             System.Single a4;
             checkType(l, 5, out a4);
             var ret = self.ShakeOnce(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 7)
         {
             EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l);
             System.Single a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Single a3;
             checkType(l, 4, out a3);
             System.Single a4;
             checkType(l, 5, out a4);
             UnityEngine.Vector3 a5;
             checkType(l, 6, out a5);
             UnityEngine.Vector3 a6;
             checkType(l, 7, out a6);
             var ret = self.ShakeOnce(a1, a2, a3, a4, a5, a6);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function ShakeOnce to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }