Exemplo n.º 1
0
 void Awake()
 {
     area     = GetComponent <BoxCollider2D>();
     playerT  = GetComponentInParent <Transform>();
     playerBC = GetComponentInParent <BoxCollider2D>();
     this.transform.position = playerT.transform.position + (playerT.transform.right * (playerBC.size.x / 2 + area.size.y / 2));
     attacking          = false;
     euphoriaController = GetComponentInParent <EuphoriaController>();
     scoreController    = GetComponentInParent <ScoreController>();
     slashController    = GetComponentInChildren <SwordSlashController>();
     attackCounter      = 0f;
     attackSwing        = 0.5f;
 }
Exemplo n.º 2
0
 void Awake()
 {
     area = GetComponent<BoxCollider2D>();
     playerT = GetComponentInParent<Transform>();
     playerBC = GetComponentInParent<BoxCollider2D>();
     this.transform.position = playerT.transform.position + (playerT.transform.right * (playerBC.size.x/2 + area.size.y/2));
     attacking = false;
     euphoriaController = GetComponentInParent<EuphoriaController>();
     scoreController = GetComponentInParent<ScoreController>();
     slashController = GetComponentInChildren<SwordSlashController>();
     attackCounter = 0f;
     attackSwing = 0.5f;
 }