void Climber()
 {
     if (raycastCheck.RaycastChecker() == "Climb" && Input.GetKey(KeyCode.W))
     {
         transform.Translate(new Vector2(0, _climbingSpeed));
     }
 }
Exemple #2
0
    void Shoot()
    {
        hit = raycastCheck.hit;

        if (raycastCheck.RaycastChecker() == "ShootAble")
        {
            Debug.Log("SHOT!!");
            StartCoroutine(OnShoot());
        }
    }
Exemple #3
0
    void Shoot()
    {
        hit    = raycastCheck.hit;
        hitObj = raycastCheck.RaycastChecker();

        if (hitObj != null)
        {
            target = hitObj;
            OnShoot();
            // initalisatie v/d timer
        }
        else if (target != null && (hitObj != target))
        {
            // nieuwe target gevonden
            ResetTarget();
        }
        else if (hitObj == null && target != null)
        {
            // hand van target weg. timer resetten etc.
            ResetTarget();
        }
    }