void Start() { player = GameObject.FindGameObjectWithTag("Player").transform; playerMov = player.gameObject.GetComponent <PlayerMovement>(); movement = GetComponent <EnemyFollowerMovement>(); attack = GetComponent <SpiderAttack>(); anim = GetComponentInChildren <Animation>(); }
// Start is called before the first frame update void Start() { stats = gameObject.GetComponent <SpiderAttack>(); gm = GameObject.Find("GameMaster").GetComponent <GameMaster>(); System.Random rand = new System.Random(); int variable = rand.Next(0, 9999); rayTrigger.name = "" + variable; }