Inheritance: MonoBehaviour
 private void Awake()
 {
     _moveRigidbody  = GetComponent <MoveRigidbody>();
     _spriteRenderer = GetComponent <SpriteRenderer>();
     _collider       = GetComponent <Collider2D>();
     _layerMask      = LayerMaskExtensions.GetMaskOrThrow("Platforms", "Items");
 }
    void Start()
    {
        Player     = GameObject.FindGameObjectWithTag("Player"); // Encontra o player via tag
        Boss       = GameObject.FindGameObjectWithTag("Boss");   // Encontra o Boss via tag
        Grounder   = GameObject.FindWithTag("Grounder");         //Identifica o objeto Grounder
        moveScript = Player.GetComponent <MoveRigidbody>();

        Comp_Call = this.gameObject.GetComponent <Comp_Call>();

        Tell_Push = GameObject.FindGameObjectWithTag("Push");
        Tell_Pull = GameObject.FindGameObjectWithTag("Pull");

        Tell_Pull.SetActive(false);
        Tell_Push.SetActive(false);
    }
 // Use this for initialization
 void Start()
 {
     moveScript             = GameObject.FindGameObjectWithTag("Player").GetComponent <MoveRigidbody>();//Vai pegar o script MovimentoPlayer
     timeLeftUntilInversion = totalTimeUntilInversion;
 }
Exemple #4
0
 private void Awake()
 {
     _moveRigidbody = GetComponent <MoveRigidbody>();
 }
 void Start()
 {
     Player      = GameObject.FindGameObjectWithTag("Player");
     Vida_Player = Player.GetComponent <Vida_Player>();
     moveScript  = Player.GetComponent <MoveRigidbody>();
 }