Ejemplo n.º 1
0
    /**************************************************************************************************/
    //calculate move type
    public void CalculateMoveType(float dis)
    {
        moveType = checkForHole(dis, bossPathing.GetPoint());
        if (bossPathing.GetPoint().y > transform.position.y)
        {
            moveType *= checkForWall(dis) * PointAbove(bossPathing.GetPoint());     //only check if point is above position
        }

        //if anything returns 0 it needs to stop
        //if anything returns 2 it needs to jump
        //if everything returns 1 keep going forward

        if (bossPathing.InBounds(bossPathing.GetPoint()))
        {
            bossPathing.NextPoint();    //get next point if hits point
            moveType = 0;               //set move type to 0
        }
    }
Ejemplo n.º 2
0
    public void Update()
    {
        if (!dead)//Spencer
        {
            if (bossPathing.FindDestination(direction.x))
            {
                bossPathing.FindPath();
                bossPathing.NextPoint();
            }

            bossPathing.DebugPoint();
            bossPathing.DebugPoints();
            DebugDirection();

            if (canAttack)
            {
                TryAttacking();
            }
        }
    }