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

        if (raycastCheck.RaycastChecker() == "ShootAble")
        {
            Debug.Log("SHOT!!");
            StartCoroutine(OnShoot());
        }
    }
Exemplo n.º 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();
        }
    }