예제 #1
0
    /// <summary>
    /// Handles the gonna drop.
    /// </summary>
    /// <returns><c>true</c>, if gonna drop was handled, <c>false</c> otherwise.</returns>
    bool HandleGonnaDrop()
    {
        DropPointLogic dropper = _door.GetComponent <DoorRobotInteraction>().dropper;
        PointsDrop     can_    = dropper.WhatDrop(gameObject.GetInstanceID());
        Vector3        pt      = dropper.GetPoint(can_ == PointsDrop.DROPRIGHT ? PointsDrop.VENTCORRECT : PointsDrop.VENTINCORRECT);

        transform.LookAt(pt);
        droppedInRight = dropper.WhereIsHe();
        if (_rm.IsHeLookingAt(pt))
        {
            _currentState = RobotState.LEAVEBOX;
            return(dropper.WhereIsHe());
        }
        return(dropper.WhereIsHe());
    }
예제 #2
0
    bool HandleGonnaDrop()
    {
        DropPointLogic dropper = _door.GetComponent <DoorRobotInteraction>().dropper;
        PointsDrop     can_    = dropper.WhatDrop(gameObject.GetInstanceID());
        Vector3        pt      = dropper.GetPoint(can_ == PointsDrop.DROPRIGHT ? PointsDrop.VENTCORRECT : PointsDrop.VENTINCORRECT);

        transform.LookAt(pt);
        //if (dropper.WhereIsHe())
        //{
        //    what = true; //if he's going to the correct path, go true
        //}
        //else what = false; //if not, go false.
        droppedInRight = dropper.WhereIsHe();
        if (_rm.IsHeLookingAt(pt))
        {
            _currentState = RobotState.LEAVEBOX;
            //   Debug.Log("Yo i'm lookin at the droppah");
            return(dropper.WhereIsHe());
        }
        return(dropper.WhereIsHe());
    }