Exemplo n.º 1
0
 void Start()
 {
     parent  = transform.parent.gameObject;
     rb      = parent.GetComponent <Rigidbody>();
     physics = parent.GetComponent <EnemyBhysics>();
     player  = GameObject.FindGameObjectWithTag("Player").transform;
 }
Exemplo n.º 2
0
 void Awake()
 {
     Player          = GameObject.FindGameObjectWithTag("Player").transform;
     Physics         = GetComponent <EnemyBhysics>();
     InitialPosition = transform.position;
     //Physics.rigidbody.velocity = Vector3.zero;
     Target = InitialPosition;
 }