예제 #1
0
 private void Start()
 {
     clara        = GetComponent <ClaraBehavior>();
     rB           = GetComponent <Rigidbody2D>();
     animator     = GetComponentInChildren <Animator>();
     soundHandler = FindObjectOfType <SoundHandler>();
     if (soundHandler == null)
     {
         Debug.LogError("There's no F*****G sound handler, you muppet");
     }
 }
예제 #2
0
    public bool IsFreeToMove(ClaraBehavior clara)
    {
        if (clara == null)
        {
            return(true);
        }

        if (clara != null)
        {
            return(Mathf.Abs(clara.transform.position.x - transform.position.x) < collider2D.size.x / 2 && clara.transform.position.y < transform.position.y);
        }

        return(false);
    }
예제 #3
0
 private void Start()
 {
     clara = GetComponentInParent <ClaraBehavior>();
 }