Skip to content

Deepankar1993/mmorpg-kit-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMORPG Kit Snippets

Utility scripts and components for the everyman. Developed for: https://assetstore.unity.com/packages/templates/systems/mmorpg-kit-2d-3d-survival-110188

If you would like to make a donation to support this effort: Donate

Overhead UI

The purpose of these scripts are to improve the rendering and behavior of Overhead UI.

Instructions:

  • Attach any of the scripts to the following Prefabs (or similarly created prefabs)
    • CanvasOwningCharacterUI
    • CanvasNonOwningCharacterUI
    • CanvasMonsterCharacterUI
    • CanvasNPCUI
    • (To leverage the harvestable overhead ui, you need to create a CanvasHarvestableUI with UI Harvestable Entity and replace instances of Harvestable Entity with "Harvestable Entity with UI")
  • Configure the parameters of the scripts to meet your needs
  • Watch the magic!

Tab Targeting

The purpose of these scripts are to improve tab targeting Instructions:

  • In the extended PlayerCharacterController, remember to remove the Input.GetButtonDown("FindEnemy") handling, as this will replace it
  • In your overwritten PlayerCharacterController, add the following:
    public override void UpdateInput() {
        // some logic
        if (ConstructingBuildingEntity == null)
        {
            UpdateSelectedTarget();
            Targeting.HandleTargeting();
            // Remove the Input.GetButtonDown("FindEnemy") check and execution!
            // some more logic
        }
        // the rest of the logic
    }
    
    protected override void OnPointClickOnGround(Vector3 targetPosition)
    {
        Targeting.m_currentlySelectedTarget = null;
        // do stuff or not (if you dont call base.OnPointClickOnGround it will disable click to move on the ground)
    }
    

Controls:

  • Hitting tab will select closest targetable harvestable/npc/player/monster
  • Hitting tab after will move the target to the right
  • Holding shift and hitting tab will move the target to the left
  • Hitting tab/shift+tab will cycle the target from the other end if you reach the end of the targetable list

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%