Example #1
0
 public override void Act(Transform player, Transform npc)
 {
     //TO IMPLEMENT
     //Rotate to the target point
     controller.MoveToTarget(player.position, curSpeed, curRotSpeed);
     controller.PointTurret();
     //Rotate turret
     //Go Forward
 }
Example #2
0
    public override void Act(Transform player, Transform npc)
    {
        //TO IMPLEMENT
        //Find another random patrol point if the current destination point is reached
        controller.MoveToTarget(destPos, curSpeed, curRotSpeed);
        float distance = Vector3.Distance(destPos, npc.position);

        if (distance <= 20f)
        {
            FindNextPoint();
        }

        //Rotate the tank and the turret
        //Go Forward
    }