private void Update() { m_PlayerState.HandleBehaviour(); m_PlayerState.HandleInput(); m_PlayerState.HandlePhysics(); if (m_Input.m_SwitchButtonDown && m_CanChangeCharacter) { if (m_PlayerData.m_ActiveCharacter.Equals(ActiveCharacter.cobalt)) { m_PlayerData.m_ActiveCharacter = ActiveCharacter.crimson; } else { m_PlayerData.m_ActiveCharacter = ActiveCharacter.cobalt; } } switch (m_PlayerData.m_ActiveCharacter) { case ActiveCharacter.cobalt: m_Animator.SetLayerWeight(1, 0f); if (m_CobaltBehaviour.m_AllowShooting) { m_CobaltBehaviour.HandleShooting(m_PlayerPhysicsBehaviour.m_Rigidbody2D.transform, m_PlayerPhysicsBehaviour.m_Direction, m_Input.m_RangedAttackButton, m_CobaltData.m_ShootSpeed, m_CobaltBulletController); } m_Animator.SetFloat("cobaltShootState", m_CobaltBehaviour.m_ShootState); if (m_Input.m_UtillityButtonDown) { m_CobaltBulletController.SwitchPolar(); } break; case ActiveCharacter.crimson: m_Animator.SetLayerWeight(1, 1f); break; } if (m_Input.m_UtillityButtonDown && m_CanChangeColor) { if (m_PlayerData.m_ActiveColor.Equals(ActiveColor.normal)) { m_PlayerData.m_ActiveColor = ActiveColor.alt; } else { m_PlayerData.m_ActiveColor = ActiveColor.normal; } } m_Animator.SetFloat("activeColor", (float)m_PlayerData.m_ActiveColor); }