Esempio n. 1
0
    IEnumerator TimerDestroy()
    {
        audio.Play();
        Text.SetActive(true);//Включается текст "есть пробитие"
        manager = Armor.parent.parent.GetComponent <Manager>();
        yield return(new WaitForSeconds(0.3f));

        moveCamera.CalculateCurva();//Камера начинает двигаться вокруг танка
        Time.timeScale = 0.3f;
        manager.OnEffectBreaking();
        Transform System = Instantiate(Pinetartion, transform.position, Quaternion.identity).transform;

        Camera.main.GetComponent <DrawSplinter>().penetrationSystem = System.GetComponent <PenetrationSystem>();
        System.GetComponent <PenetrationSystem>().manager           = manager;
        Destroy(gameObject);
    }