Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        rigidbody2D = GetComponent <Rigidbody2D>();
        player      = player.GetComponent <MainCharacterScript>();

        target   = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
        animator = GetComponent <Animator>();
    }
 // Start is called before the first frame update
 void Start()
 {
     player = player.GetComponent <MainCharacterScript>();
 }