protected override void Start() { base.Start(); animator = GetComponent <Animator>(); comboJSON = GetComponent <PlayerComboJSON>(); rb2d = GetComponent <Rigidbody2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); comboQueue = new Queue <IEnumerator>(); playerLayer = LayerMask.NameToLayer("Player"); enemyLayer = LayerMask.NameToLayer("Enemy"); platformLayer = LayerMask.NameToLayer("Platform"); comboUI = FindObjectOfType <ComboUI>(); cpManager = cpManager.FindObjectOfType <cpManager>(); healthBar = GameObject.FindGameObjectWithTag("PlayerHealth"); healthX = healthBar.transform.localScale.x; }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player"); cpManager = cpManager.FindObjectOfType <cpManager>(); rangeSquare = Mathf.Pow(radius, 2); }