1using System.Collections.Generic;
 
   41#pragma warning disable 414 
   43#pragma warning restore 414 
   49    [Tooltip(
"Should be populated in the prefab with the equipped item sprite renderer")]
 
  122                                    false, 
false, 
false, 
false);
 
  174        m_XInput = Input.GetAxisRaw( 
"Horizontal" );
 
  175        m_YInput = Input.GetAxisRaw( 
"Vertical" );
 
  223        if( Input.GetKey( KeyCode.LeftShift ) || Input.GetKey( KeyCode.RightShift ) )
 
  245        if( Input.GetMouseButton(0) )
 
  264        if( itemDetails != 
null )
 
  269                    if( Input.GetMouseButtonDown(0) )
 
  276                    if( Input.GetMouseButtonDown(0) )
 
  325        if( Input.GetKey( KeyCode.T ) )
 
  331        if( Input.GetKey( KeyCode.G) )
 
  337        if( Input.GetKey( KeyCode.L ) )
 
  371                        false, 
false, 
false, 
false);
 
  395        m_EquippedItemSpriteRenderer.sprite = 
null;
 
  396        m_EquippedItemSpriteRenderer.color = 
new Color( 1f, 1f, 1f, 0f );
 
  415        if( itemDetails != 
null )
 
  417            m_EquippedItemSpriteRenderer.sprite = itemDetails.
m_ItemSprite;
 
  418            m_EquippedItemSpriteRenderer.color = 
new Color( 1f, 1f, 1f, 1f );
 
  437        return m_MainCamera.WorldToViewportPoint( transform.position );
 
Direction
Describes the player facing direction
 
ToolEffect
Describes the tool effect
 
PartVariantType
Describes the part variant type
 
InventoryLocation
Describes the type of inventory and count Ex: player inventory or chest inventory
 
SceneName
Describes different scenes.
 
ItemType
Describe the item type
 
PartVariantColor
Describe the part variant color Currently we don't use that because we don't have the assets with dif...
 
CharacterPartAnimator
Describes the character part animator. Each body part has a separate animator
 
void ApplyCharacterCustomisationParameters(List< CharacterAttribute > characterAttributesList)
Handles the animation overrides
 
Raise an handle event when a movement is triggered.
 
static void CallMovementEvent(float xInput, float yInput, bool isWalking, bool isRunning, bool isIdle, bool isCarrying, ToolEffect toolEffect, bool isUsingToolRight, bool isUsingToolLeft, bool isUsingToolUp, bool isUsingToolDown, bool isLiftingToolRight, bool isLiftingToolLeft, bool isLiftingToolUp, bool isLiftingToolDown, bool isPickingRight, bool isPickingLeft, bool isPickingUp, bool isPickingDown, bool isSwingingToolRight, bool isSwingingToolLeft, bool isSwingingToolUp, bool isSwingingToolDown, bool idleRight, bool idleLeft, bool idleUp, bool idleDown)
Movement Event Call For Publishers.
 
static void CallDropSelectedItemEvent()
 
bool CursorPositionIsValid
 
This class will manage all the inventory related operations.
 
This class holds information of items.
 
This class has all the things related to player
 
void Start()
Initialize grid cursor variable.
 
void DisablePlayerInputAndResetMovement()
Disable input and reset movement.
 
List< CharacterAttribute > m_CharacterAttributeCustomisationList
 
void ProcessPlayerClickInputCommodity(ItemDetails itemDetails)
Check the position is valid and the item can be dropped for commodity.
 
void PlayerMovement()
Calculate player movements.
 
bool m_IsLiftingToolRight
 
Direction m_PlayerDirection
 
void PlayerWalkInput()
Handle player walk inputs.
 
void ProcessPlayerClickInput()
 
Vector3 GetPlayerViewportPosition()
Check the player position in the gameworld.
 
CharacterAttribute m_ToolCharacterAttribute
 
bool m_IsSwingingToolRight
 
void ProcessPlayerClickInputSeed(ItemDetails itemDetails)
Check the position is valid and the item can be dropped for seed.
 
AnimationOverrides m_AnimationOverrides
 
void PlayerMovementInput()
Handle player inputs and normalized that.
 
SpriteRenderer m_EquippedItemSpriteRenderer
 
CharacterAttribute m_ArmsCharacterAttribute
 
void FixedUpdate()
Handle player movements.
 
bool m_IsSwingingToolLeft
 
bool m_IsSwingingToolDown
 
void ResetAnimatioTriggers()
Reset the animation triggers.
 
void Update()
Handle movement inputs and publish animation events.
 
void Awake()
Initialize members
 
bool m_PlayerInputIsDisabled
 
void ResetMovement()
Reset Movement
 
void DisablePlayerInput()
Disable Player Input
 
void PlayerClickInput()
If the grid cursor is enabled and player click left mouse button call ProcessPlayerClickInput()
 
void PlayerTestInput()
TODO: Remove before final product.
 
bool PlayerInputIsDisabled
 
Rigidbody2D m_RigidBody2D
 
void ShowCarriedItem(int itemCode)
Show the carried item.
 
void EnablePlayerInput()
Enable Player Input
 
void ClearCarriedItem()
Clear the carry animation
 
Manage the transition between scenes
 
This class handle the game settings.
 
const float m_WalkingSpeed
 
const float m_RunningSpeed
Player Movements.
 
Abstract class that inherited by all the game managers. All the game managers use singleton since gam...
 
A singleton manager class for time managements.
 
Define what character variant we want to switch into.