public void moodProgress(int v, unitBase unit) { /* * int moodLevel = unit.iGet(UIA.moodLevel); * MoodProgress.value = v; * switch (moodLevel) * { * case 1: * { * moodFill.color = Color.red; * break; * } * case 2: * { * moodFill.color = color_ghuang; * break; * } * case 3: * { * moodFill.color = color_tianlan; * break; * } * case 4: * { * moodFill.color = color_qingse; * break; * } * case 5: * { * moodFill.color = Color.green; * break; * } * } */ }
public void refresh(unitBase unit) { setName(unit.name); setFull(unit.full); txtEnergy.text = unit.energy.ToString(); //moodProgress(unit.mood, unit); string s = ""; //string k = ""; foreach (KeyValuePair <int, Condition> v in unit.buff) { //Console.WriteLine("姓名:{0},电影:{1}", v.Key, v.Value); s += "<color=green>" + conditionData.Instance.get(v.Value.id).name + "</color>\n"; //k += "<color=green>+" + conditionData.Instance.get(v.Value.id).mood + "</color>\n"; } foreach (KeyValuePair <int, Condition> v in unit.debuff) { //Debug.Log("v.Value.id=" + v.Value.id); s += "<color=red>" + conditionData.Instance.get(v.Value.id).name + "</color>\n"; //k += "<color=red>" + conditionData.Instance.get(v.Value.id).mood + "</color>\n"; } txtCondition.text = s; //txtCondtionValue.text = k; setTxtMood(unit); }
public void init(unitBase v) { m_manager = v; if (m_manager.headSkin < 0) { hasHead = false; headSkinIdNow = m_manager.headSkin; } }
public Condition(int _id, unitBase _unit) { id = _id; startTime = GTime.Instance.GTick; unit = _unit; if (conditionData.Instance.get(id).deleteMethod == 0 && conditionData.Instance.get(id).deleteTime >= 0) { deleteTick = GTime.Instance.GTick; } }
public void setTxtMood(unitBase unit) { string s = ""; if (unit.type == 4) { int moodLevel = unit.iGet(UIA.moodLevel); switch (moodLevel) { case 1: { s = "<color=red>" + "崩溃" + "</color>"; break; } case 2: { s = "<color=#FF9912ff>" + "难受" + "</color>"; break; } case 3: { s = "<color=#87ceebff>" + "一般" + "</color>"; break; } case 4: { s = "<color=#00ffffff>" + "满足" + "</color>"; break; } case 5: { s = "<color=green>" + "幸福" + "</color>"; break; } } } txtMood.text = s; }
public void init(unitBase v) { m_manager = v; }
public void init(unitBase m) { baseUnit = m; }