public virtual void Start() { move = GetComponent <Move_Behavior>(); attack = GetComponent <Attack_Behavior>(); controller = new Controller(input); }
void Start() { attack = GetComponentInParent <Attack_Behavior>(); if (attack.player == "Player1") { enemy = "Player2"; } else { enemy = "Player"; } }
void Start() { life = GetComponent <Life_Behavior>(); attack = GetComponent <Attack_Behavior>(); move = GetComponent <Move_Behavior>(); input = GetComponent <Input_Behavior>(); collider = transform.GetChild(0).GetComponent <BoxCollider2D>(); anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); sprite = GetComponent <SpriteRenderer>(); CreatePlayer(); }