Esempio n. 1
0
    /// <summary>
    /// 重置拖动信息
    /// </summary>
    private void ResetDragable()
    {
        CharacterRotation component = GetComponent <CharacterRotation>();

        if (component)
        {
            component.target      = ModelArray != null ? ModelBox : null;
            component.normalAngle = 0;
            component.ResetAngle();
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 检查旋转组件
    /// </summary>
    private void CheckCharacterRotationComponent()
    {
        CharacterRotation component = GetComponent <CharacterRotation>();

        if (component != null)
        {
            component.target      = m_ModelRoot != null ? m_ModelRoot.transform : null;
            component.normalAngle = GetBaseRotation().y;
            component.ResetAngle();
        }
    }