예제 #1
0
    public override void CharacterUpdate()
    {
        currInputDelay -= 1;
        if (currInputDelay <= 0)
        {
            currInputDelay = 0;
            questionMark.SetActive(true);
        }


        if (currDelay <= 0)
        {
            currDelay = ActionDelay;
            //Vector3 waypointPos = objectiveManager.Waypoint;
            Character hitCharacter = null;
            MovDir    backup       = currDir;
            Mover.MoveCharacter(this, out charInTheWay, true, currDir, Physics.DefaultRaycastLayers);
            currDir = backup;

            /*
             * if (!Mover.MoveCharacterToWayPoint(
             *  this,
             *  out hitCharacter,
             *  true,
             *  waypointPos,
             *  Physics.DefaultRaycastLayers))
             * {
             *  Mover.MoveCharacterToWayPoint(
             *  this,
             *  out hitCharacter,
             *  true,
             *  -waypointPos,
             *  Physics.DefaultRaycastLayers);
             * }
             */
            objectiveManager.AttemptToCompleteObjective();
        }
        else
        {
            currDelay -= 1;
        }
    }