コード例 #1
0
    protected override void OnShow(INotification notification)
    {
        if (powerMediator == null)
        {
            powerMediator = Facade.RetrieveMediator("PowerMediator") as PowerMediator;
        }
        GoldType type = (GoldType)notification.Body;

        this.shopType = type;
        switch (type)
        {
        case GoldType.Power:
            panel.maxTime.text = TextManager.GetString("UIPower3");
            panel.Text.text    = TextManager.GetUIString("UI1047");
            panel.dollar.gameObject.SetActive(false);
            panel.power.gameObject.SetActive(true);
            break;

        case GoldType.Euro:
            panel.maxTime.text = TextManager.GetString("UIPower2");
            panel.Text.text    = TextManager.GetUIString("UI1046");
            panel.power.gameObject.SetActive(false);
            panel.dollar.gameObject.SetActive(true);
            break;
        }
        UpdateTimes();
    }
コード例 #2
0
 protected override void OnDestroy()
 {
     powerMediator = null;
     base.OnDestroy();
 }