void Start() { Slime s = transform.root.GetComponent <Slime>(); model = s.GetModel(); agent = s.GetAgent(); slime = s.GetSlimeClass(); photonView = GetComponent <PhotonView>(); gameManager = GameManager.Instance; }
void Start() { s = transform.parent.GetComponent <Slime>(); health = transform.parent.GetComponent <SlimeHealth>(); model = s.GetModel(); agent = s.GetAgent(); slime = s.GetSlimeClass(); GetComponent <SphereCollider>().radius = slime.detectRadius; enemyTag = (transform.parent.tag == "Team_RED") ? "Team_BLUE" : "Team_RED"; photonView = transform.parent.GetComponent <PhotonView>(); gameManager = GameManager.Instance; }