Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        bgMaterial           = background.material;
        origBgColorMain      = bgMaterial.GetColor("_MainColor");
        origBgColorSecondary = bgMaterial.GetColor("_SecondaryColor");
        origBgScaleX         = bgMaterial.GetFloat("_ScaleX");

        motherShip = GameObject.FindGameObjectWithTag("MotherShip").GetComponent <MotherShip>();
        objects    = motherShip.GetComponentsInChildren <SpriteRenderer>();

        origScaleX = motherShip.transform.localScale.x;
        origScaleY = motherShip.transform.localScale.y;

        player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>();
        foreach (var obj in GameObject.FindGameObjectsWithTag("WarpEffect"))
        {
            warpEffects.Add(obj.GetComponent <ParticleSystem>());
        }
        currentWarpEndDuration = warpDurationEndIntro;
        UnWarp(true);
        FullscreenFade.main.FadeOut(AfterFadeOut);
    }