public void UpdateWarType() { this.warType = WarManager.instance.WarProgress.warType; string spriteName = this.iconNames[((int) this.warType) - 1]; string advanceColorNames = this.advanceColorNames; string disadvanceColorNames = this.advanceColorNames; if (this.warType == WarTypes.OppositeWay) { advanceColorNames = this.disadvanceColorNames; disadvanceColorNames = this.disadvanceColorNames; } else if (this.warType == WarTypes.TAdvance) { disadvanceColorNames = this.disadvanceColorNames; } else if (this.warType == WarTypes.TDisadvance) { advanceColorNames = this.disadvanceColorNames; } this.selfColor.SetSprite(advanceColorNames); this.enemyColor.SetSprite(disadvanceColorNames); this.selfIcon.SetSprite(spriteName); this.enemyIcon.SetSprite(spriteName); this.selfColor.gameObject.SetActive(true); this.enemyColor.gameObject.SetActive(true); this.selfIcon.gameObject.SetActive(true); this.enemyIcon.gameObject.SetActive(true); }
public static string getWarTypeString(WarTypes warType) { switch (warType) { case WarTypes.SameWay: return "同航战"; case WarTypes.OppositeWay: return "反航战"; case WarTypes.TAdvance: return "T字战 优势"; default: case WarTypes.TDisadvance: return "T字战 劣势"; } }
private void Start() { this.warType = WarManager.instance.WarProgress.warType; this.SetWarTypeInfo(); }