public Color GetCampUColorFromType(int _campType) { SFCxForm SFColor = GetCampSFColorFromType(_campType); Color color = new Color((float)SFColor.GetElem(4), (float)SFColor.GetElem(5), (float)SFColor.GetElem(6), (float)SFColor.GetElem(7)); return(color); }
public bool GetColorTransform(ref SFCxForm cxform) { if (!IsDisplayObject()) { return(false); } return(SF_GetColorTransform(this, cxform)); }
public GFxCampManager() { SFCxWhite = new SFCxForm(Color.white); SFCxRed = new SFCxForm(new Color(211, 119, 124, 255)); SFCxGreen = new SFCxForm(new Color(49, 169, 45, 255)); SFCxBlue = new SFCxForm(new Color(65, 198, 238, 255)); SFCxYellow = new SFCxForm(new Color(231, 231, 168, 255)); SFCxGray = new SFCxForm(new Color(230, 234, 230, 255)); SFCxGold = new SFCxForm(new Color(255, 255, 0, 255)); }
/// <summary> /// 根据阵营类型返回相应的颜色 /// </summary> /// <returns>返回SF类型的Color</returns> public SFCxForm GetCampSFColorFromType(int _campType) { SFCxForm color = null; switch (_campType) { case ((int)GFxCampTpye.CT_Self | (int)GFxCampRelated.CR_Name): //17 color = SFCxYellow; break; case ((int)GFxCampTpye.CT_Friend | (int)GFxCampRelated.CR_Name): //18 case ((int)GFxCampTpye.CT_Enemy | (int)GFxCampRelated.CR_Name): //19 case ((int)GFxCampTpye.CT_Neutral | (int)GFxCampRelated.CR_Name): //20 case ((int)GFxCampTpye.CT_EnemyInstantKill | (int)GFxCampRelated.CR_Name): //21 color = SFCxGray; break; case ((int)GFxCampTpye.CT_Self | (int)GFxCampRelated.CR_Blood): //33 color = SFCxGreen; break; case ((int)GFxCampTpye.CT_Friend | (int)GFxCampRelated.CR_Blood): //34 color = SFCxBlue; break; case ((int)GFxCampTpye.CT_Enemy | (int)GFxCampRelated.CR_Blood): //35 case ((int)GFxCampTpye.CT_Neutral | (int)GFxCampRelated.CR_Blood): //36 color = SFCxRed; break; case ((int)GFxCampTpye.CT_EnemyInstantKill | (int)GFxCampRelated.CR_Blood): //37 color = SFCxGold; break; default: color = SFCxWhite; break; } //Trace.LogError("_campType=" + _campType); //Trace.LogError(("CxForm = " + color.GetElem(0) + " " + color.GetElem(1) + " " + color.GetElem(2) + " " + color.GetElem(3) // + " " + color.GetElem(4) + " " + color.GetElem(5) + " " + color.GetElem(6) + " " + color.GetElem(7))); return(color); }
public bool GetColorTransform(ref SFCxForm cxform) { if (!IsDisplayObject()) { return false; } return SF_GetColorTransform(this, cxform); }
protected static extern bool SF_SetColorTransform(Value target, SFCxForm cxform);
private static extern bool SF_GetColorTransform(Value target, [Out] SFCxForm cxform);
private static extern bool SF_SetColorTransform(Value target, SFCxForm cxform);
/// <summary> /// Gets the ColorTransform associated with the target Value which must be a DisplayObject. /// </summary> /// <param name="cxform">ColorTransform structure.</param> /// <returns>True if the operation succeeded.</returns> public bool GetColorTransform(ref SFCxForm cxform) { if (!IsDisplayObject()) { return false; } #if UNITY_WP8 return sf_getColorTransform(this, cxform); #else return SF_GetColorTransform(this, cxform); #endif }