Esempio n. 1
0
    private void Start()
    {
        Physics2D.IgnoreLayerCollision(9, 10, true);
        web = GetComponent <LineRenderer>();
        web.SetPosition(0, new Vector3(startPosition.x, startPosition.y + webOffset));
        web.SetPosition(1, new Vector3(startPosition.x, startPosition.y + webOffset));
        web.sortingLayerName = "Player Foreground";
        web.sortingOrder     = -1;
        startPosition        = transform.position;
        endPosition.x        = transform.position.x;

        animator = GetComponentInChildren <Animator>();
        animator.SetBool("ascending", false);
        animator.SetBool("descending", false);
        animator.SetBool("attacking", false);
        animator.SetBool("idle", true);

        player = GameObject.Find("Player").GetComponent <HidingSkill>();

        SwitchTo(HangingSpiderState.Idle);
    }
Esempio n. 2
0
 private void Start()
 {
     targetObject = "Player";
     player       = GameObject.Find("Player").GetComponent <HidingSkill>();
 }