Exemple #1
0
    // Use this for initialization
    void Start()
    {
        isAlive = true;
        sr      = GetComponent <SpriteRenderer>();
        sideS   = this.transform.parent.GetComponent <EnemiesScript>().sideS;
        transform.LookAt2D(player.transform, Vector2.up);

        GetComponent <Rigidbody2D>().velocity = transform.up * speed;
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     sideS = sideGoj.GetComponent <SideScript>();
 }