1using System.Collections;
2using System.Collections.Generic;
41 bool isWalking,
bool isRunning,
bool isIdle,
bool isCarrying,
43 bool isUsingToolRight,
bool isUsingToolLeft,
bool isUsingToolUp,
bool isUsingToolDown,
44 bool isLiftingToolRight,
bool isLiftingToolLeft,
bool isLiftingToolUp,
bool isLiftingToolDown,
45 bool isPickingRight,
bool isPickingLeft,
bool isPickingUp,
bool isPickingDown,
46 bool isSwingingToolRight,
bool isSwingingToolLeft,
bool isSwingingToolUp,
bool isSwingingToolDown,
47 bool idleRight,
bool idleLeft,
bool idleUp,
bool idleDown )
57 if ( isUsingToolRight )
66 if ( isUsingToolDown )
71 if ( isLiftingToolRight )
74 if ( isLiftingToolLeft )
77 if ( isLiftingToolUp )
80 if ( isLiftingToolDown )
85 if ( isSwingingToolRight )
88 if ( isSwingingToolLeft )
91 if ( isSwingingToolUp )
94 if ( isSwingingToolDown )
ToolEffect
Describes the tool effect
Control and trigger animations based on the right moves.
void Awake()
Use for initialisation
void OnDisable()
When an object is disable, we unsubscrib from animations
void OnEnable()
When an object is enabled, we subscribed to animations
void AnimationEventPlayFootstepSound()
Play footstep sound via animation events.
void SetAnimationParameters(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)
We take the parameters and trigger appopriate animations.
This class handle the game settings.
static int m_IsSwingingToolLeft
static int m_IsLiftingToolRight
static int m_IsUsingToolDown
static int m_IsPickingRight
static int m_IsPickingLeft
static int m_IsLiftingToolLeft
static int m_XInput
Player Animation Parameters.
static int m_IsLiftingToolDown
static int m_IsPickingDown
static int m_IsSwingingToolDown
static int m_IsUsingToolRight
static int m_IsLiftingToolUp
static int m_IsSwingingToolRight
static int m_IsUsingToolUp
static int m_IdleUp
Shared Animation Parameters.
static int m_IsSwingingToolUp
static int m_IsUsingToolLeft