Esempio n. 1
0
 public void Explosion()
 {
     explosionEffect1.SetEffect(Effect.Explosion(0.1f), Quaternion.Euler(Vector3.forward * Random.Range(0, 360))).Play();
     explosionEffect2.SetEffect(Effect.Explosion(0.2f), Quaternion.Euler(Vector3.forward * Random.Range(0, 360))).Play();
     explosionEffect3.SetEffect(Effect.Explosion(0.1f), Quaternion.Euler(Vector3.forward * Random.Range(0, 360))).Play();
     explosionEffect4.SetEffect(Effect.Explosion(0.2f), Quaternion.Euler(Vector3.forward * Random.Range(0, 360))).Play();
 }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        app = UnityEngine.Object.FindObjectOfType <App>();
        Music musicPlayer = app.GetComponentInChildren <Music>();

        musicPlayer.musicOn = true;

        newGameButton.onClick.AddListener(delegate { startNewGame(); });
        loadGameButton.onClick.AddListener(delegate { loadSavedGame(); });

        logoTransform = imperialTimesLogo.GetComponent <RectTransform>();
        logoFadeIn    = UIAnimator.Scale(logoTransform, new Vector3(0, 0, 0), new Vector3(2, 2, 2), 2f).SetModifier(Modifier.QuadIn);
        Quaternion rotation = logoTransform.localRotation;

        logoFadeIn.SetEffect(Effect.Spring(0.5f, 1), rotation);

        /* logoFadeIn = new UIGroupAnimation(
         * UIAnimator.FadeIn(logoTransform.GetComponent<Image>(), 2),
         * UIAnimator.FadeIn(logoTransform.GetComponentInChildren<Image>(), 2),
         * UIAnimator.FadeIn(logoTransform.GetComponentInChildren<TextMeshProUGUI>(), 2)
         * ); */


        //  logoFadeIn.SetDelay(1f);
        logoFadeIn.Play();
        // imperialTimesLogo.SetActive(false);
        //  logoRect = imperialTimesLogo.GetComponentInChildren<Graphic>();
        //imperialTimesLogo.SetActive(true);
        // logoFadeIn = new UIGroupAnimation(
        //   UIAnimator.FadeIn(logoBackground, 1.5f),
        //  UIAnimator.FadeIn(logoOrniment, 1.5f)
        // diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 3f),
        //  diplomacyIn = UIAnimator.ChangeColor(logoOrniment, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 3f)
        //  );
        // diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f);
        // diplomacyIn = UIAnimator.ChangeColor(logoOrniment, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f);
        //  diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f);
        // logoFadeIn.Play();
        //  Debug.Log("Are you doing anything?");
    }