void Start() { gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); mainCamera = GameObject.Find("Main Camera"); audio = GetComponent <AudioSource>(); playerRb = GetComponent <Rigidbody>(); weaponStandardAction = Instantiate(WeaponSet, transform.position, WeaponSet.transform.rotation).GetComponent <WeaponStandardAction>(); weaponStandardAction.Master = this.gameObject; init(); }
// Start is called before the first frame update void Start() { player = GameObject.Find("Player"); playerController = player.GetComponent <PlayerController>(); enemyRb = GetComponent <Rigidbody>(); weaponStandardAction = Instantiate(WeaponSet, transform.position, WeaponSet.transform.rotation).GetComponent <WeaponStandardAction>(); weaponStandardAction.Master = this.gameObject; isDead = false; changeCooldownOver = true; attackCooldownOver = true; }
// Start is called before the first frame update void Start() { actionScript = transform.parent.gameObject.GetComponent <WeaponStandardAction>(); }