Exemplo n.º 1
0
 protected virtual void OnEnable()
 {
     meshParent    = serializedObject.FindProperty("meshParent");
     sceneMaterial = serializedObject.FindProperty("ScreenshotMaterial");
     particles     = serializedObject.FindProperty("meshParticleSystem");
     controller    = (ShatterController)target;
 }
Exemplo n.º 2
0
    IEnumerator ScreenShot()
    {
        yield return(new WaitForEndOfFrame());

        Texture2D texture = new Texture2D(Screen.width, Screen.height, TextureFormat.ARGB32, false);

        texture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
        texture.Apply();

        ShatterController SController = Instantiate(Resources.Load <ShatterController>("Shattered Object"));

        SController.AnimateEvent(texture);
        BattleMusicManager.PlayTheme();
    }