void Update()
    {
        Hand = GetComponentInChildren <Robo_hand>();
        dist = Player.transform.position.x - transform.position.x;

        if (dist > 0 && FacingRight == false && Hand.aimed_check)
        {
            flip();
        }
        else if (dist < 0 && FacingRight == true && Hand.aimed_check)
        {
            flip();
        }
    }
Пример #2
0
 void Start()
 {
     Rob_Hand = GetComponent <Robo_hand>();
 }