Example #1
0
        // start the walk
        private void StartWalk(Vector3 dir)
        {
            CharacterTargetingComponent character = player.GetComponent <CharacterTargetingComponent>();

            if (null != character)
            {
                const float MoveOffset = 2f;
                character.SetMovementTarget(player.transform.position + dir * MoveOffset);
            }
        }
Example #2
0
    public static void LocalPlayerDisableNavigation()
    {
        PlayerController controller = PlayerManager.LocalPlayerController();

        if (null != controller)
        {
            CharacterTargetingComponent characterTargetingComp = controller.gameObject.GetComponent <CharacterTargetingComponent>();
            if (null != characterTargetingComp)
            {
                characterTargetingComp.SetMovementTarget(Vector3.zero, true);
            }

            SelectionLogic selection = controller.GetComponent <SelectionLogic>();
            if (null != selection)
            {
                selection.DisablePlayerSelectionControls();
            }
        }
    }