Beispiel #1
0
    public void Initialize(UIManager.Member data)
    {
        m_Data = data;
        m_HP   = data.hp;

        var image = GetComponent <Image>();

        image.enabled = true;
        image.sprite  = data.battle;
        image.SetNativeSize();
        SendMessage("SetSliderValue", 1);
    }
Beispiel #2
0
    void OnEnable()
    {
        UIManager.Member member = uiManager.currentMember;

        if (m_NameText)
        {
            m_NameText.text = member.name;
        }

        if (m_HpmpText)
        {
            m_HpmpText.text = "HP " + member.hp + " / MP " + member.mp;
        }

        if (m_CommentText)
        {
            m_CommentText.text = member.comment;
        }

        m_MainImage.sprite = member.large;

        ShowAnimation();
    }
Beispiel #3
0
    //初期化してアニメーション実行
    public void SetUp(int order, UIManager.Member data, Color cardColor, Color activeColor)
    {
        m_Data        = data;
        data.selected = false;

        if (m_NameText)
        {
            m_NameText.GetComponent <Text>().text = m_Data.name;
        }

        if (m_HpmpText)
        {
            m_HpmpText.text = "HP " + m_Data.hp + " / MP " + m_Data.mp;
        }

        if (m_Face)
        {
            m_Face.sprite = m_Data.large;
            m_Face.SetNativeSize();
        }

        this.m_CardColor   = cardColor;
        this.m_ActiveColor = activeColor;

        m_Body.color             = cardColor;
        m_ActiveBackground.color = activeColor;
        m_UnderCard.color        = cardColor;

        isActive     = false;
        currentState = SetDefection();
        m_Body.transform.localPosition = Vector3.zero;

        if (rectTransform.anchoredPosition.y > m_HideThreshold)
        {
            PlayAnimation(order);
        }
    }