Ejemplo n.º 1
0
 void Awake()
 {
     holeItemPrefab      = ResModel.Instance.GetPrefab("prefab/skillmodule/" + "SkillHoleItem");
     listHole.itemPrefab = holeItemPrefab;
     InitView();
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
 }
Ejemplo n.º 2
0
    override protected void UpdateView()
    {
        if (FightModel.Instance.fightInfo.isWin)
        {
            bool isPassed = MapModel.Instance.IsPassed(BattleModel.Instance.crtConfig.id);

            SkillTempletInfo skillTempletInfo = SkillTempletModel.Instance.GetUnlockSkill(BattleModel.Instance.crtConfig.id);
            if (skillTempletInfo == null || isPassed || skillTempletInfo.config.type != 1)
            {
                winA.gameObject.SetActive(true);
            }
            else
            {
                winB.gameObject.SetActive(true);
            }
        }
        else
        {
            bool skillModuleIsUnlockLevelUp = SkillTempletModel.Instance.SkillModuleIsUnlockLevelUp();
            if (skillModuleIsUnlockLevelUp)
            {
                loseB.gameObject.SetActive(true);
            }
            else
            {
                loseA.gameObject.SetActive(true);
            }
        }

        FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
    }
Ejemplo n.º 3
0
	public void Show(bool isShow)
	{
		gameObject.SetActive (isShow);
		if(isShow)
		{
            FontUtil.SetAllFont(transform, FontUtil.FONT_1);

			WealthInfo coin = PlayerModel.Instance.GetWealth((int)WealthTypeEnum.Coin);

            costText.text = "" + PropModel.Instance.crtProp.config.GetCost(PropModel.Instance.crtProp.countUsed + 1);
            if (PropModel.Instance.crtProp.config.GetCost(PropModel.Instance.crtProp.countUsed + 1) > coin.count)
			{
				costText.color = Color.red;
			}else
			{
				costText.color = Color.green;
			}
			
			timesText.text = PropModel.Instance.crtProp.count + "/" + PropModel.Instance.crtProp.config.times; 
			
			if(PropModel.Instance.crtProp.count > 0)
			{
				timesText.color = Color.green;
                costTrans.gameObject.SetActive(true);
			}else
			{
				timesText.color = Color.red;
                costTrans.gameObject.SetActive(false);
			}
		}else
		{
			
		}
	}
Ejemplo n.º 4
0
 void Awake()
 {
     holeItemPrefab      = GameMgr.resourceMgr.GetGameObject("prefab/skillmodule.ab", "SkillHoleItem");
     listHole.itemPrefab = holeItemPrefab;
     InitView();
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
 }
Ejemplo n.º 5
0
 void Awake()
 {
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
     title.text   = LanguageUtil.GetTxt(11416);
     content.text = LanguageUtil.GetTxt(11417);
     sureBtn.transform.FindChild("Text").GetComponent <Text>().text = LanguageUtil.GetTxt(11407);
     noBtn.GetComponentInChildren <Text>().text = LanguageUtil.GetTxt(11418);
 }
Ejemplo n.º 6
0
    public void InitTasks()
    {
        list.ClearList();

        List <TIVInfo> taskList = BattleModel.Instance.crtConfig.GetTaskList();

        int taskLen = taskList.Count;

        for (int i = 0; i < taskLen; i++)
        {
            CreateTaskItem(i, taskList[i]);
        }
        FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
    }
Ejemplo n.º 7
0
 void Awake()
 {
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
 }
Ejemplo n.º 8
0
 protected virtual void Awake()
 {
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
 }
Ejemplo n.º 9
0
 void Awake()
 {
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
     UpdateView();
     PrepareModule.LayItemCount++;
 }
Ejemplo n.º 10
0
 protected virtual void Awake()
 {
     iconImage = transform.Find("icon").GetComponent <Image>();
     FontUtil.SetAllFont(transform, FontUtil.FONT_DEFAULT);
 }