Exemple #1
0
    public override void Tap(GameObject obj, Vector3 point, StateMachine checkMachine)
    {
        if (obj == null)
        {
            return;
        }
        TreeMachine tm = obj.GetComponentInParent <TreeMachine> ();

        if (tm != null)
        {
            canInteract = tm.CanChop();
            if (tm.CanChop())
            {
                tm.timer.StartTimer(tm.chopTime, true, InputMachine.instance.reticle.getTimerLocation(), numbers: false);
            }
            return;
        }
    }
Exemple #2
0
    public override void CheckInteract(GameObject obj, Vector3 point, StateMachine checkMachine)
    {
        if (obj == null)
        {
            canInteract = false;
            return;
        }
        TreeMachine tm = obj.GetComponentInParent <TreeMachine> ();

        if (tm != null)
        {
            tm.Interact(obj, point);
            canInteract = tm.CanChop();
            return;
        }
        canInteract = false;
    }