protected void SetCardFront() { ColorLeftUp.gameObject.SetActive(false); ColorRightDown.gameObject.SetActive(false); CdValueSpUp.gameObject.SetActive(false); CdValueSpDown.gameObject.SetActive(false); switch (CdValue) { case HdCdsCtrl.SmallJoker: { CdBg.spriteName = HdCdsCtrl.SmallJoker.ToString(CultureInfo.InvariantCulture); CdBg.MakePixelPerfect(); return; } case HdCdsCtrl.BigJoker: { CdBg.spriteName = HdCdsCtrl.BigJoker.ToString(CultureInfo.InvariantCulture); CdBg.MakePixelPerfect(); return; } case HdCdsCtrl.MagicKing: { CdBg.spriteName = HdCdsCtrl.MagicKing.ToString(CultureInfo.InvariantCulture); CdBg.MakePixelPerfect(); return; } } CdBg.spriteName = "front"; ColorLeftUp.gameObject.SetActive(true); ColorRightDown.gameObject.SetActive(true); CdValueSpUp.gameObject.SetActive(true); CdValueSpDown.gameObject.SetActive(true); var color = PokerRuleUtil.GetColor(CdValue); var value = HdCdsCtrl.GetValue(CdValue).ToString(CultureInfo.InvariantCulture); ColorLeftUp.spriteName = "s_" + color + "_0"; ColorRightDown.spriteName = "s_" + color + "_0"; if (color > 2) { CdValueSpUp.spriteName = "black_" + value; CdValueSpDown.spriteName = "black_" + value; } else { CdValueSpUp.spriteName = "red_" + value; CdValueSpDown.spriteName = "red_" + value; } CdBg.MakePixelPerfect(); ColorLeftUp.MakePixelPerfect(); ColorRightDown.MakePixelPerfect(); CdValueSpUp.MakePixelPerfect(); CdValueSpDown.MakePixelPerfect(); }
public void SetHdcdctrlInstance(HdCdsCtrl instance) { _hdCdsCtrlInstance = instance; }