////////////////////////////////////////// /// SetState() /// Sets the graphic for the blessing based /// on the incoming state. ////////////////////////////////////////// private void SetState( BlessingStates i_eState, EffectData i_effect ) { m_eState = i_eState; // set the sprite string strSprite = BlessingKey + "_" + i_eState.ToString(); Image.sprite = Resources.Load<Sprite>( strSprite ); // set the alpha string strAlphaKey = "BlessingAlpha_" + i_eState.ToString(); float fAlpha = Constants.GetConstant<float>( strAlphaKey ); Color color = Image.color; color.a = fAlpha; Image.color = color; // update the tooltip UpdateTooltip( i_effect ); }
////////////////////////////////////////// /// SetState() /// Sets the graphic for the blessing based /// on the incoming state. ////////////////////////////////////////// private void SetState(BlessingStates i_eState, EffectData i_effect) { m_eState = i_eState; // set the sprite string strSprite = BlessingKey + "_" + i_eState.ToString(); Image.sprite = Resources.Load <Sprite>(strSprite); // set the alpha string strAlphaKey = "BlessingAlpha_" + i_eState.ToString(); float fAlpha = Constants.GetConstant <float>(strAlphaKey); Color color = Image.color; color.a = fAlpha; Image.color = color; // update the tooltip UpdateTooltip(i_effect); }