1234567891011121314151617181920212223242526272829303132333435363738 |
- using UnityEngine;
- using System.Collections;
- public class ClanInfoViewStack : ViewStack
- {
- private int clanId = 0;
- protected override void Awake ()
- {
- base.Awake ();
- InitCompleted.AddListener(Refresh);
- }
- public void SetClanId(int clanId)
- {
- this.clanId = clanId;
- for(int i=0; i<viewArr.Length; i++)
- {
- viewArr [i].data = clanId;
- }
- Refresh ();
- }
- public void Refresh()
- {
- if (!initialized)
- return;
- if (clanId == 0) {
- viewIndex = 0;
- } else {
- viewIndex = 1;
- }
- }
- }
|