예제 #1
0
    // Gets called when our transition is complete
    public void TransitionCompleted(EZTransition transition)
    {
        prevTransition = null;

        // Deactivate all child objects?
        if (deactivateAllOnDismiss)
        {
            // If this was a dismissal:
            if (transition == Transitions.list[2] ||
                transition == Transitions.list[3])
            {
                gameObject.SetActiveRecursively(false);
            }
        }

        if (tempTransCompleteDel != null)
        {
            tempTransCompleteDel(this, transition);
        }
        tempTransCompleteDel = null;

        if (blockInput[prevTransIndex] && UIManager.Exists())
        {
            UIManager.instance.UnlockInput();
        }
    }
    public override void Copy(IControl c, ControlCopyFlags flags)
    {
        base.Copy(c);
        if (!(c is UIStateToggleBtn3D))
        {
            return;
        }
        UIStateToggleBtn3D uIStateToggleBtn3D = (UIStateToggleBtn3D)c;

        if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
        {
            this.defaultState = uIStateToggleBtn3D.defaultState;
        }
        if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
        {
            this.prevTransition = uIStateToggleBtn3D.prevTransition;
            if (Application.isPlaying)
            {
                this.SetToggleState(uIStateToggleBtn3D.StateNum);
            }
        }
        if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
        {
            this.scriptWithMethodToInvoke = uIStateToggleBtn3D.scriptWithMethodToInvoke;
            this.methodToInvoke           = uIStateToggleBtn3D.methodToInvoke;
            this.whenToInvoke             = uIStateToggleBtn3D.whenToInvoke;
            this.delay = uIStateToggleBtn3D.delay;
        }
        if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
        {
            this.soundToPlay = uIStateToggleBtn3D.soundToPlay;
        }
    }
예제 #3
0
    void SetInviteFriendsInactive(EZTransition transition)
    {
        inviteFriendScroll.ClearList(true);
        AddNewFriendsAndClearList();

        inviteFriendPanel.SetActive(false);
    }
예제 #4
0
	void InitShop(EZTransition transition)
	{
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);
		
		RefreshItemsScroll();
		RefreshCoinsScroll();
		
		// Manda carregar o Video, se o sistema de ADS estiver rodando e o cara tiver permissao de assistir aquele video naquela hora
        if (Advertisement.IsRunning()) 
		{
			Debug.Log("ads running");
			if(Save.HasKey(PlayerPrefsKeys.VIDEO))
			{
				Debug.Log("has video key");
				if((DateTime.Parse(Save.GetString(PlayerPrefsKeys.VIDEO)) - DateTime.UtcNow) <= TimeSpan.FromDays(1))
				{
					Debug.Log("already watched for the time being");
					return;
				}
			}
			
			Debug.Log("FETCH VIDEO!");
			Advertisement.Video.Fetch();
			
		}
		
		Debug.Log("chamou InitShop");
	}
    public override void Copy(SpriteRoot s, ControlCopyFlags flags)
    {
        base.Copy(s, flags);
        if (!(s is UIStateToggleBtn))
        {
            return;
        }
        UIStateToggleBtn uIStateToggleBtn = (UIStateToggleBtn)s;

        if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
        {
            this.defaultState = uIStateToggleBtn.defaultState;
        }
        if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
        {
            this.prevTransition = uIStateToggleBtn.prevTransition;
            if (Application.isPlaying)
            {
                this.SetToggleState(uIStateToggleBtn.StateNum);
            }
        }
        if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
        {
            this.scriptWithMethodToInvoke = uIStateToggleBtn.scriptWithMethodToInvoke;
            this.methodToInvoke           = uIStateToggleBtn.methodToInvoke;
            this.whenToInvoke             = uIStateToggleBtn.whenToInvoke;
            this.delay = uIStateToggleBtn.delay;
        }
        if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
        {
            this.soundToPlay = uIStateToggleBtn.soundToPlay;
        }
    }
    public override void Copy(IControl c, ControlCopyFlags flags)
    {
        base.Copy(c, flags);
        if (!(c is UIButton3D))
        {
            return;
        }
        UIButton3D uIButton3D = (UIButton3D)c;

        if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
        {
            this.prevTransition = uIButton3D.prevTransition;
            if (Application.isPlaying)
            {
                this.SetControlState(uIButton3D.controlState);
            }
        }
        if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
        {
            this.scriptWithMethodToInvoke = uIButton3D.scriptWithMethodToInvoke;
            this.methodToInvoke           = uIButton3D.methodToInvoke;
            this.whenToInvoke             = uIButton3D.whenToInvoke;
            this.delay = uIButton3D.delay;
        }
        if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
        {
            this.soundOnOver  = uIButton3D.soundOnOver;
            this.soundOnClick = uIButton3D.soundOnClick;
        }
        if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
        {
            this.repeat = uIButton3D.repeat;
        }
    }
예제 #7
0
    // Sets the control to its disabled appearance:
    protected void DisableMe()
    {
        // The disabled state is the last in the states list:
        SetState(states.Length - 1);

        this.UseStateLabel(states.Length - 1);

        // Set the layer states:
        for (int i = 0; i < layers.Length; ++i)
        {
            if (stateIndices[i, states.Length - 1] != -1)
            {
                layers[i].SetState(stateIndices[i, states.Length - 1]);
            }
        }

        // End any current transition:
        if (prevTransition != null)
        {
            prevTransition.StopSafe();
        }

        transitions[states.Length - 1].list[0].Start();
        prevTransition = transitions[states.Length - 1].list[0];
    }
예제 #8
0
	void InitChallenge(EZTransition transition)
	{
		Debug.Log("initChallenge");
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);
		
		newPanel.gameObject.SetActive(true);
		oldPanel.gameObject.SetActive(false);
		
		if(newPanel.transform.FindChild("NewScroll").GetComponent<UIScrollList>().Count != 0) noFriendsLabel.Text = "";
		else noFriendsLabel.Text = "No New Challenges";
		
		// Manda carregar o Video, se o sistema de ADS estiver rodando e o cara tiver permissao de assistir aquele video naquela hora
        if (Advertisement.IsRunning()) 
		{
			Debug.Log("ads running");
			if(Save.HasKey(PlayerPrefsKeys.VIDEO))
			{
				Debug.Log("has video key");
				if((DateTime.Parse(Save.GetString(PlayerPrefsKeys.VIDEO)) - DateTime.UtcNow) <= TimeSpan.FromDays(1))
				{
					Debug.Log("already watched for the time being");
					return;
				}
			}
			
			Debug.Log("FETCH VIDEO!");
			Advertisement.Video.Fetch();
		}
		
		Connect();
		
		//Debug.Log("chamou InitChallenge");
	}
예제 #9
0
    // Starts the appropriate transition
    protected void StartTransition(int newState, int prevState)
    {
        int transIndex = DetermineNextTransition(newState, prevState);

        prevTransition = transitions[newState].list[transIndex];
        prevTransition.Start();
    }
예제 #10
0
 protected override void OnDisable()
 {
     base.OnDisable();
     if (this.transitionQueued)
     {
         this.nextTransition.RemoveTransitionEndDelegate(new EZTransition.OnTransitionEndDelegate(this.RunFollowupTrans));
         this.transitionQueued = false;
     }
     if (EZAnimator.Exists() && !this.deleted)
     {
         bool flag = this.alwaysFinishActiveTransition;
         this.alwaysFinishActiveTransition = false;
         if (this.controlState == UIButton.CONTROL_STATE.DISABLED)
         {
             this.SetControlState(UIButton.CONTROL_STATE.DISABLED);
         }
         else if (!this.isListButton)
         {
             this.SetControlState(UIButton.CONTROL_STATE.NORMAL);
         }
         if (this.prevTransition != null && this.prevTransition.IsRunning())
         {
             this.prevTransition.End();
         }
         this.alwaysFinishActiveTransition = flag;
     }
     this.prevTransition = null;
 }
 public virtual void StartTransition(string transName)
 {
     if (!this.m_started)
     {
         this.Start();
     }
     EZTransition[] list = this.Transitions.list;
     for (int i = 0; i < list.Length; i++)
     {
         if (string.Equals(list[i].name, transName, StringComparison.CurrentCultureIgnoreCase))
         {
             if (this.prevTransition != null)
             {
                 this.prevTransition.StopSafe();
             }
             this.prevTransIndex = i;
             if (this.blockInput[this.prevTransIndex])
             {
                 NrTSingleton <UIManager> .Instance.LockInput();
             }
             this.prevTransition = list[this.prevTransIndex];
             if (this.deactivateAllOnDismiss && (this.prevTransition == list[1] || this.prevTransition == list[0]))
             {
                 base.gameObject.SetActive(true);
                 this.Start();
             }
             this.prevTransition.Start();
         }
     }
 }
예제 #12
0
    // Gets called when our transition is complete
    public void TransitionCompleted(EZTransition transition)
    {
        prevTransition = null;

        // Deactivate all child objects?
        if (deactivateAllOnDismiss)
        {
            // If this was a dismissal:
            if (transition == Transitions.list[2] ||
                transition == Transitions.list[3])
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
            { gameObject.SetActive(false); }
#else
            { gameObject.SetActiveRecursively(false); }
#endif
        }

        if (tempTransCompleteDel != null)
        {
            tempTransCompleteDel(this, transition);
        }
        tempTransCompleteDel = null;

        if (changeDelegate != null)
        {
            changeDelegate(this);
        }

        if (blockInput[prevTransIndex] && UIManager.Exists())
        {
            UIManager.instance.UnlockInput();
        }
    }
예제 #13
0
    protected void StartTransition(int newState, int prevState)
    {
        int num = 0;

        switch (newState)
        {
        case 0:
            switch (prevState)
            {
            case 0:
                this.prevTransition = null;
                return;

            case 1:
                num = 0;
                break;

            case 2:
                num = 1;
                break;
            }
            break;

        case 1:
            switch (prevState)
            {
            case 0:
                num = 0;
                break;

            case 1:
                this.prevTransition = null;
                return;

            case 2:
                num = 1;
                break;
            }
            break;

        case 2:
            switch (prevState)
            {
            case 0:
                num = 0;
                break;

            case 1:
                num = 1;
                break;

            case 2:
                this.prevTransition = null;
                return;
            }
            break;
        }
        this.transitions[newState].list[num].Start();
        this.prevTransition = this.transitions[newState].list[num];
    }
예제 #14
0
    public override void Copy(SpriteRoot s, ControlCopyFlags flags)
    {
        base.Copy(s, flags);
        if (!(s is UIButton))
        {
            return;
        }
        UIButton uIButton = (UIButton)s;

        if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
        {
            this.prevTransition = uIButton.prevTransition;
            if (Application.isPlaying)
            {
                this.SetControlState(uIButton.controlState);
            }
        }
        if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
        {
            this.scriptWithMethodToInvoke = uIButton.scriptWithMethodToInvoke;
            this.methodToInvoke           = uIButton.methodToInvoke;
            this.whenToInvoke             = uIButton.whenToInvoke;
            this.delay = uIButton.delay;
        }
        if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
        {
            this.soundOnOver  = uIButton.soundOnOver;
            this.soundOnClick = uIButton.soundOnClick;
        }
        if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
        {
            this.repeat = uIButton.repeat;
        }
    }
예제 #15
0
    void StartGame(EZTransition transition)
    {
        if (clickedNext)
        {
            return;
        }
        if (Flow.path == TurnStatus.AnswerGame)
        {
            Flow.path = TurnStatus.BeginGame;
            // Fix Me UPTOP Mandar para world Selection
            //Flow.nextPanel = PanelToLoad.GunSelection;
            //Application.LoadLevel("Mainmenu");
            UIPanelManager.instance.BringIn("LevelSelectionPanel");
        }
        else if (Flow.path == TurnStatus.ShowPast)
        {
            Flow.path = TurnStatus.AnswerGame;
            //Flow.nextPanel = PanelToLoad.GunSelection;
            //Application.LoadLevel("Mainmenu");

            Flow.config.GetComponent <ConfigManager>().inviteAllScroll.transform.parent       = GameObject.FindWithTag("RepoFLists").transform;
            Flow.config.GetComponent <ConfigManager>().invitePlayingScroll.transform.parent   = GameObject.FindWithTag("RepoFLists").transform;
            Flow.config.GetComponent <ConfigManager>().challengeInviteScroll.transform.parent = GameObject.FindWithTag("RepoFLists").transform;

            Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(false);
            Application.LoadLevel("Game");
        }
    }
예제 #16
0
    protected void StartTransition(int newState, int prevState)
    {
        int num = this.DetermineNextTransition(newState, prevState);

        this.prevTransition = this.transitions[newState].list[num];
        this.prevTransition.Start();
    }
예제 #17
0
    void InitShop(EZTransition transition)
    {
        Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);

        RefreshItemsScroll();
        RefreshCoinsScroll();

        // Manda carregar o Video, se o sistema de ADS estiver rodando e o cara tiver permissao de assistir aquele video naquela hora
        if (Advertisement.IsRunning())
        {
            Debug.Log("ads running");
            if (Save.HasKey(PlayerPrefsKeys.VIDEO))
            {
                Debug.Log("has video key");
                if ((DateTime.Parse(Save.GetString(PlayerPrefsKeys.VIDEO)) - DateTime.UtcNow) <= TimeSpan.FromDays(1))
                {
                    Debug.Log("already watched for the time being");
                    return;
                }
            }

            Debug.Log("FETCH VIDEO!");
            Advertisement.Video.Fetch();
        }

        Debug.Log("chamou InitShop");
    }
 public void SetCheckState(int s)
 {
     this.curStateIndex = s % (this.states.Length - 1);
     if (!base.gameObject.activeInHierarchy)
     {
         this.stateChangeWhileDeactivated = true;
         if (this.changeDelegate != null)
         {
             this.changeDelegate(this);
         }
         return;
     }
     this.SetState(this.curStateIndex);
     base.UseStateLabel(this.curStateIndex);
     this.UpdateCollider();
     for (int i = 0; i < this.layers.Length; i++)
     {
         if (this.stateIndices[i, this.curStateIndex] != -1)
         {
             this.layers[i].Hide(false);
             this.layers[i].SetState(this.stateIndices[i, this.curStateIndex]);
         }
         else
         {
             this.layers[i].Hide(true);
         }
     }
     if (this.prevTransition != null)
     {
         this.prevTransition.StopSafe();
     }
     this.transitions[this.curStateIndex].list[0].Start();
     this.prevTransition = this.transitions[this.curStateIndex].list[0];
 }
예제 #19
0
    // Queues a transition to play following the previous (currently-running) transition
    protected void QueueTransition(int newState, int prevState, bool suppressTransition)
    {
        if (deleted)
        {
            return;
        }

        nextTransition = transitions[newState].list[DetermineNextTransition(newState, prevState)];
        nextState      = (CONTROL_STATE)newState;

        if (suppressTransition)
        {
            prevTransition.End();
            prevTransition = nextTransition;
            prevTransition.Start();
            prevTransition.End();             // Immediately place the transition into its "end state".
            return;
        }

        // See if we've already queued to run a follow-up transition:
        if (!transitionQueued)
        {
            prevTransition.AddTransitionEndDelegate(RunFollowupTrans);
        }

        transitionQueued = true;
    }
예제 #20
0
    void AddEmail(EZTransition transition)
    {
        GameObject t = GameObject.Instantiate(inviteFriendPrefab) as GameObject;

        t.transform.FindChild("TextField").GetComponent <UITextField>().AddFocusDelegate(CreateInviteFriendsContainer);

        inviteFriendScroll.AddItem(t.GetComponent <UIListItemContainer>());
    }
예제 #21
0
    void Start()
    {
        bringInFoward = interPanel.GetTransition(UIPanelManager.SHOW_MODE.BringInForward);
        dismissForwad = interPanel.GetTransition(UIPanelManager.SHOW_MODE.DismissForward);

        bringInFoward.AddTransitionEndDelegate(AppearEnd);
        dismissForwad.AddTransitionEndDelegate(HideEnd);
    }
예제 #22
0
 void BringFirstPastPanel(EZTransition transition)
 {
     if (clickedNext)
     {
         return;
     }
     firstPastPanel.transitions.list[0].AddTransitionEndDelegate(DismissFirstPastPanel);
     firstPastPanel.BringIn();
 }
예제 #23
0
    void InitLevelSelection(EZTransition transition)
    {
        Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);

        if (!Save.HasKey("actualWorld"))
        {
            actualWorld = 1;
        }
        else
        {
            actualWorld = Save.GetInt("actualWorld");
        }

        scrollLevels.ScrollToItem(actualWorld - 1, 0.5f);

        //scrollLevels.SetSelectedItem(actualWorld);
        scrollLevels.AddItemSnappedDelegate(SetWorld);

        //Debug.Log ("actualWorld: " + actualWorld);

        // salva as estrelas ganhas no flow

        foreach (KeyValuePair <int, World> w in Flow.worldDict)
        {
            foreach (KeyValuePair <int, Level> l in w.Value.levelDict)
            {
                if (Save.HasKey(PlayerPrefsKeys.LEVELSTARS + l.Key))
                {
                    l.Value.stars = Save.GetInt(PlayerPrefsKeys.LEVELSTARS + (l.Key).ToString());                   // world1_level1_stars
                    Debug.Log("l.Value.stars: " + l.Value.stars + ", level: " + l.Value.id + ", world: " + w.Value.id);
                    //l.Value.points = l.Key;
                }
            }
        }

        for (int i = 0; i < 5; i++)
        {
            for (int j = 0; j < 9; j++)
            {
                int stars = i * 9 + 7 + j;

                if (Save.HasKey(PlayerPrefsKeys.LEVELSTARS + stars))
                {
                    transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i + 1).ToString() + " List Item").
                    FindChild("Level " + (j + 1).ToString() + " Panel").GetComponent <Level>().stars = Save.GetInt(PlayerPrefsKeys.LEVELSTARS + stars);
                }
                else
                {
                    transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i + 1).ToString() + " List Item").
                    FindChild("Level " + (j + 1).ToString() + " Panel").GetComponent <Level>().stars = 0;
                }

                transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i + 1).ToString() + " List Item").
                FindChild("Level " + (j + 1).ToString() + " Panel").GetComponent <Level>().SetStars();
            }
        }
    }
예제 #24
0
    public void EnteredInvite(EZTransition transition)
    {
        scroll.gameObject.SetActive(true);

        if (scroll.Count == 0 && playingScroll.Count == 0)
        {
            GetFriends();
        }
    }
예제 #25
0
 void DismissFirstPastPanel(EZTransition transition)
 {
     if (clickedNext)
     {
         return;
     }
     firstPastPanel.transitions.list[2].AddTransitionEndDelegate(BringSecondPastPanel);
     firstPastPanel.Dismiss();
 }
예제 #26
0
	void InitLevelSelection(EZTransition transition)
	{
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);
		
		if (!Save.HasKey ("actualWorld")) 
		{
			actualWorld = 1;
		}
		else
		{
			actualWorld = Save.GetInt ("actualWorld");
		}
		
		scrollLevels.ScrollToItem(actualWorld-1, 0.5f);
		
		//scrollLevels.SetSelectedItem(actualWorld);
		scrollLevels.AddItemSnappedDelegate(SetWorld);
		
		//Debug.Log ("actualWorld: " + actualWorld);
		
		// salva as estrelas ganhas no flow
		
		foreach(KeyValuePair<int, World> w in Flow.worldDict)
		{
			foreach (KeyValuePair<int, Level> l in w.Value.levelDict)
			{
				if (Save.HasKey (PlayerPrefsKeys.LEVELSTARS+l.Key))
				{
					l.Value.stars = Save.GetInt(PlayerPrefsKeys.LEVELSTARS+(l.Key).ToString()); // world1_level1_stars
					Debug.Log("l.Value.stars: " + l.Value.stars + ", level: " + l.Value.id + ", world: " + w.Value.id);
					//l.Value.points = l.Key;
				}
			}
		}
		
		for(int i = 0; i < 5; i++)
		{
			for(int j = 0; j < 9; j++)
			{
				int stars = i*9+7+j;
				
				if (Save.HasKey (PlayerPrefsKeys.LEVELSTARS+stars))
				{
					transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i+1).ToString() + " List Item").
					FindChild("Level " + (j+1).ToString() + " Panel").GetComponent<Level>().stars = Save.GetInt(PlayerPrefsKeys.LEVELSTARS+stars);
				}
				else
				{
					transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i+1).ToString() + " List Item").
					FindChild("Level " + (j+1).ToString() + " Panel").GetComponent<Level>().stars = 0;
				}
				
				transform.FindChild("ScrollLevels").FindChild("Mover").FindChild("World " + (i+1).ToString() + " List Item").
					FindChild("Level " + (j+1).ToString() + " Panel").GetComponent<Level>().SetStars();
			}
		}
	}
예제 #27
0
    /// <summary>
    /// Sets the button's toggle state to the specified state.
    /// </summary>
    /// <param name="s">The zero-based state number/index.</param>
    public void SetToggleState(int s)
    {
        curStateIndex = s % (states.Length - 1);

        // First see if we need to postpone this state
        // change for when we are active:
        if (!gameObject.active)
        {
            stateChangeWhileDeactivated = true;

            // Call our changed delegate:
            if (changeDelegate != null)
            {
                changeDelegate(this);
            }

            return;
        }

        this.SetState(curStateIndex);

        this.UseStateLabel(curStateIndex);

        // Recalculate our collider
        UpdateCollider();

        // Loop through each layer and set its state,
        // provided we have a valid index for that state:
        for (int i = 0; i < layers.Length; ++i)
        {
            if (-1 != stateIndices[i, curStateIndex])
            {
                layers[i].Hide(false);
                layers[i].SetState(stateIndices[i, curStateIndex]);
            }
            else
            {
                layers[i].Hide(true);
            }
        }

        // End any current transition:
        if (prevTransition != null)
        {
            prevTransition.StopSafe();
        }

        transitions[curStateIndex].list[0].Start();
        prevTransition = transitions[curStateIndex].list[0];

        // Call our changed delegate:
        if (changeDelegate != null && !stateChangeWhileDeactivated)
        {
            changeDelegate(this);
        }
    }
 protected void DisableMe()
 {
     base.UseStateLabel(this.states.Length - 1);
     if (this.prevTransition != null)
     {
         this.prevTransition.StopSafe();
     }
     this.transitions[this.states.Length - 1].list[0].Start();
     this.prevTransition = this.transitions[this.states.Length - 1].list[0];
 }
예제 #29
0
    void Connect(EZTransition transition)
    {
        Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);

        notInThisPanel = false;
        Debug.Log("gameListCount: " + Flow.gameList.Count);
        Debug.Log("scrollCount: " + scroll.Count);

        if (Flow.gameList.Count > 0)
        {
            noGamesYet.Text = "";

            // Fix Me Up Top Coloquei um porque adicionei a forca um container offline
            if (scroll.Count == 0)
            {
                Debug.Log("adicioneiVelhosContainersNaLista");

                sortList();

                for (int i = 0; i < Flow.gameList.Count; i++)
                {
                    if (Flow.gameList[i].id != -999)
                    {
                        Debug.Log("coloquei " + Flow.gameList[i].friend.name);
                        // seta past index na lista para atualizacoes que foram feitas em battle status...
                        Flow.gameList[i].pastIndex = i;
                        //scroll.InsertItem(Flow.gameList[i].GetComponent<UIListItemContainer>(), i);
                        Debug.Log("picture flow: " + Flow.gameList[i].friend.rawText.ToString());
                        CreateGameContainer(Flow.gameList[i], i);
                    }
                    else if (Flow.gameList[i].whoseMove == "your")
                    {
                        Debug.Log("coloquei label your " + i);
                        AddTurnLabel("your", i);
                    }
                    else if (Flow.gameList[i].whoseMove == "their")
                    {
                        Debug.Log("coloquei label their " + i);
                        AddTurnLabel("their", i);
                    }
                }
            }
        }

        Debug.Log("tem token: " + Save.HasKey(PlayerPrefsKeys.TOKEN));
        if (Save.HasKey(PlayerPrefsKeys.TOKEN))
        {
            Debug.Log("token: " + Save.GetString(PlayerPrefsKeys.TOKEN));
        }

        WWWForm form = new WWWForm();

        form.AddField("lastUpdate", TimeZoneInfo.ConvertTimeToUtc(Flow.lastUpdate).ToString());
        new GameJsonAuthConnection(Flow.URL_BASE + "mines/getgames.php", OnReceiveGames).connect(form);
    }
    // Sets the control to its disabled appearance:
    protected void DisableMe()
    {
        // End any current transition:
        if (prevTransition != null)
        {
            prevTransition.StopSafe();
        }

        transitions[states.Length - 1].list[0].Start();
        prevTransition = transitions[states.Length - 1].list[0];
    }
예제 #31
0
 void DismissSecondPastPanel(EZTransition transition)
 {
     if (clickedNext)
     {
         return;
     }
     //lastPastPanel.transitions.list[2].AddTransitionEndDelegate(StartGame);
     //lastPastPanel.Dismiss();
     winLosePanel.transitions.list[2].AddTransitionEndDelegate(StartGame);
     winLosePanel.Dismiss();
 }
 public void SetToggleState(int s)
 {
     this.curStateIndex = s % (this.states.Length - 1);
     base.UseStateLabel(this.curStateIndex);
     if (this.prevTransition != null)
     {
         this.prevTransition.StopSafe();
     }
     this.transitions[this.curStateIndex].list[0].Start();
     this.prevTransition = this.transitions[this.curStateIndex].list[0];
 }
예제 #33
0
 void BringSecondPastPanel(EZTransition transition)
 {
     if (clickedNext)
     {
         return;
     }
     //lastPastPanel.transitions.list[0].AddTransitionEndDelegate(DismissSecondPastPanel);
     //lastPastPanel.BringIn();
     winLosePanel.transitions.list[0].AddTransitionEndDelegate(DismissSecondPastPanel);
     winLosePanel.BringIn();
 }
예제 #34
0
    // Starts the appropriate transition
    protected void StartTransition(int newState, int prevState)
    {
        int transIndex = 0;

        // What state are we now in?
        switch (newState)
        {
        case 0:                 // True
                                // Where did we come from?
            switch (prevState)
            {
            case 1:                             // False
                transIndex = 0;
                break;

            case 2:                             // Disabled
                transIndex = 1;
                break;
            }
            break;

        case 1:                 // False
                                // Where did we come from?
            switch (prevState)
            {
            case 0:                             // True
                transIndex = 0;
                break;

            case 2:                             // Disabled
                transIndex = 1;
                break;
            }
            break;

        case 2:                 // Disabled
                                // Where did we come from?
            switch (prevState)
            {
            case 0:                             // True
                transIndex = 0;
                break;

            case 1:                             // False
                transIndex = 1;
                break;
            }
            break;
        }

        transitions[newState].list[transIndex].Start();
        prevTransition = transitions[newState].list[transIndex];
    }
예제 #35
0
	void Connect(EZTransition transition)
	{
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(true);
		
		notInThisPanel = false;
		Debug.Log ("gameListCount: " + Flow.gameList.Count);
		Debug.Log ("scrollCount: " + scroll.Count);
		
		if (Flow.gameList.Count > 0)
		{
			noGamesYet.Text = "";
				
			// Fix Me Up Top Coloquei um porque adicionei a forca um container offline
			if (scroll.Count == 0)
			{
				Debug.Log ("adicioneiVelhosContainersNaLista");
				
				sortList();
								
				for (int i = 0; i < Flow.gameList.Count; i++)
				{	
					if (Flow.gameList[i].id != -999) 
					{
						Debug.Log("coloquei " + Flow.gameList[i].friend.name);
						// seta past index na lista para atualizacoes que foram feitas em battle status...
						Flow.gameList[i].pastIndex = i;
						//scroll.InsertItem(Flow.gameList[i].GetComponent<UIListItemContainer>(), i);
						Debug.Log("picture flow: "+Flow.gameList[i].friend.rawText.ToString());
						CreateGameContainer (Flow.gameList[i], i);
					}
					else if(Flow.gameList[i].whoseMove == "your")
					{
						Debug.Log("coloquei label your " + i);
						AddTurnLabel("your", i);
					}
					else if(Flow.gameList[i].whoseMove == "their")
					{
						Debug.Log("coloquei label their " + i);
						AddTurnLabel("their", i);
					}
				}
			}
		}
		
		Debug.Log("tem token: "+Save.HasKey(PlayerPrefsKeys.TOKEN));
		if(Save.HasKey(PlayerPrefsKeys.TOKEN)) Debug.Log("token: "+Save.GetString(PlayerPrefsKeys.TOKEN));
		
		WWWForm form = new WWWForm();
		form.AddField("lastUpdate",TimeZoneInfo.ConvertTimeToUtc(Flow.lastUpdate).ToString());
		new GameJsonAuthConnection(Flow.URL_BASE + "mines/getgames.php", OnReceiveGames).connect(form);
	}
예제 #36
0
	void OptionsLoad(EZTransition transition)
	{
		soundVolumeSlider.Value = Save.GetFloat(PlayerPrefsKeys.VOLUME.ToString());
		if(Save.GetString(PlayerPrefsKeys.PUSHNOTIFICATIONS.ToString()) == "On") 
		{
			pushOn.gameObject.SetActive(true);
			pushOff.gameObject.SetActive(false);
		}
		else 
		{
			pushOff.gameObject.SetActive(true);
			pushOn.gameObject.SetActive(false);
		}
	}
예제 #37
0
	void InitRankings(EZTransition transition)
	{
		Debug.Log("transition rankings");
		stageName.Text = Flow.currentRank.name;
		hostName.Text = "Hosted by " + Flow.currentRank.creatorName;
		if(Flow.currentRank.hostID == Save.GetString(PlayerPrefsKeys.ID))
		{
			playAgainButton.SetActive(false);
			challengeButton.SetActive(true);
		}
		else
		{
			playAgainButton.SetActive(true);
			challengeButton.SetActive(false);
		}
		transform.FindChild("World"+(Flow.currentRank.world+1).ToString()).gameObject.SetActive(true);
		Connect();
	}
예제 #38
0
	void InitReplay (EZTransition transition) 
	{
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(false);
		if(Flow.currentGame.friend.rawText != null) enemyPicture.material.mainTexture = Flow.currentGame.friend.rawText;
		else
		{
			GameRawAuthConnection conn = new GameRawAuthConnection(Flow.URL_BASE + "login/picture.php", HandleGetFriendPicture);
			WWWForm form = new WWWForm();
			form.AddField("user_id", Flow.currentGame.friend.id);
			
			conn.connect(form);
		}
		
		enemyName.Text = Flow.currentGame.friend.name;
		
		int enemyPoints = 0;
		int myPoints = 0;
		for(int i = 0 ; i < Flow.ROUNDS_PER_TURN ; i++)
		{
			//myPoints += Flow.currentGame.pastMyRoundList[i].playerRoundWin;
			//enemyPoints += Flow.currentGame.pastTheirRoundList[i].playerRoundWin;
		}
		
		if(enemyPoints > myPoints) 
		{
			Flow.enemyWin = true;
			Flow.playerWin = false;
		}
		else if(myPoints > enemyPoints) 
		{
			Flow.playerWin = true;
			Flow.enemyWin = false;
		}
		else
		{
			Flow.playerWin = false;
			Flow.enemyWin = false;
		}
	}
	/// <summary>
	/// Sets the button's toggle state to the specified state.
	/// </summary>
	/// <param name="s">The zero-based state number/index.</param>
	public virtual void SetToggleState(int s)
	{
		curStateIndex = s % (states.Length-1);

		this.UseStateLabel(curStateIndex);

		// End any current transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		transitions[curStateIndex].list[0].Start();
		prevTransition = transitions[curStateIndex].list[0];
	}
예제 #40
0
	protected void DecrementTransitioningPanels(UIPanelBase p, EZTransition t)
	{
		--transitioningPanelCount;
	}
예제 #41
0
	/// <summary>
	/// Sets the button's toggle state to the specified state.
	/// </summary>
	/// <param name="s">The zero-based state number/index.</param>
	public void SetToggleState(int s)
	{
		curStateIndex = s % (states.Length-1);

		this.SetState(curStateIndex);

		this.UseStateLabel(curStateIndex);

		// Recalculate our collider
		UpdateCollider();

		// Loop through each layer and set its state,
		// provided we have a valid index for that state:
		for (int i = 0; i < layers.Length; ++i)
		{
			if (-1 != stateIndices[i, curStateIndex])
			{
				layers[i].Hide(false);
				layers[i].SetState(stateIndices[i, curStateIndex]);
			}
			else
				layers[i].Hide(true);
		}

		// End any current transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		transitions[curStateIndex].list[0].Start();
		prevTransition = transitions[curStateIndex].list[0];
	}
예제 #42
0
	void BringSecondPastPanel(EZTransition transition)
	{
		lastPastPanel.transitions.list[0].AddTransitionEndDelegate(DismissSecondPastPanel);
		lastPastPanel.BringIn();
	}
예제 #43
0
	void InitShop(EZTransition transition)
	{
		RefreshItemsScroll();
		RefreshCoinsScroll();
	}
예제 #44
0
	void StartGame(EZTransition transition)
	{
		if(Flow.path == TurnStatus.AnswerGame)
		{
			Flow.path = TurnStatus.BeginGame;
			// Fix Me UPTOP Mandar para world Selection
			Application.LoadLevel("Game");
		}
		else if(Flow.path == TurnStatus.ShowPast)
		{
			Flow.path = TurnStatus.AnswerGame;
			Application.LoadLevel("Game");
		}
	}
예제 #45
0
	// Starts the appropriate transition
	protected void StartTransition(int newState, int prevState)
	{
		int transIndex = 0;

		// What state are we now in?
		switch (newState)
		{
			case 0:	// True
				// Where did we come from?
				switch (prevState)
				{
					case 1: // False
						transIndex = 0;
						break;
					case 2:	// Disabled
						transIndex = 1;
						break;
				}
				break;
			case 1:	// False
				// Where did we come from?
				switch (prevState)
				{
					case 0: // True
						transIndex = 0;
						break;
					case 2:	// Disabled
						transIndex = 1;
						break;
				}
				break;
			case 2:	// Disabled
				// Where did we come from?
				switch (prevState)
				{
					case 0: // True
						transIndex = 0;
						break;
					case 1:	// False
						transIndex = 1;
						break;
				}
				break;
		}

		transitions[newState].list[transIndex].Start();
		prevTransition = transitions[newState].list[transIndex];
	}
예제 #46
0
	public override void Copy(SpriteRoot s, ControlCopyFlags flags)
	{
		base.Copy(s, flags);

		if (!(s is UIStateToggleBtn))
			return;

		UIStateToggleBtn b = (UIStateToggleBtn)s;

		if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
		{
			defaultState = b.defaultState;
		}

		if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
		{
			prevTransition = b.prevTransition;

			if (Application.isPlaying)
				SetToggleState(b.StateNum);
		}

		if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
		{
			scriptWithMethodToInvoke = b.scriptWithMethodToInvoke;
			methodToInvoke = b.methodToInvoke;
			whenToInvoke = b.whenToInvoke;
			delay = b.delay;
		}

		if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
		{
			soundToPlay = b.soundToPlay;
		}
	}
예제 #47
0
	// Sets the control to its disabled appearance:
	protected void DisableMe()
	{
		// The disabled state is the last in the states list:
		SetState(states.Length - 1);

		this.UseStateLabel(states.Length - 1);

		// Set the layer states:
		for (int i = 0; i < layers.Length; ++i)
		{
			if (stateIndices[i, states.Length - 1] != -1)
				layers[i].SetState(stateIndices[i, states.Length - 1]);
		}

		// End any current transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		transitions[states.Length - 1].list[0].Start();
		prevTransition = transitions[states.Length - 1].list[0];
	}
예제 #48
0
	public override void Copy(IControl c, ControlCopyFlags flags)
	{
		if (!(c is UIRadioBtn3D))
			return;

		base.Copy(c);

		UIRadioBtn3D b = (UIRadioBtn3D)c;

		if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
		{
			group = b.group;
			defaultValue = b.defaultValue;
		}

		if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
		{
			prevTransition = b.prevTransition;

			if (Application.isPlaying)
				Value = b.Value;
		}

		if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
		{
			scriptWithMethodToInvoke = b.scriptWithMethodToInvoke;
			methodToInvoke = b.methodToInvoke;
			whenToInvoke = b.whenToInvoke;
			delay = b.delay;
		}

		if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
		{
			soundToPlay = b.soundToPlay;
		}
	}
예제 #49
0
	// Gets called when our transition is complete
	public void TransitionCompleted(EZTransition transition)
	{
		prevTransition = null;

		// Deactivate all child objects?
		if(deactivateAllOnDismiss)
		{
			// If this was a dismissal:
			if (transition == Transitions.list[2] ||
			   transition == Transitions.list[3])
				gameObject.SetActiveRecursively(false);
		}

		if (tempTransCompleteDel != null)
			tempTransCompleteDel(this, transition);
		tempTransCompleteDel = null;

		if (blockInput[prevTransIndex] && UIManager.Exists())
			UIManager.instance.UnlockInput();
	}
예제 #50
0
	void FillValues(EZTransition transition)
	{
		Debug.Log(Save.GetString(PlayerPrefsKeys.NAME.ToString()));
		
		if(Flow.path == TurnStatus.BeginGame)
		{
			Flow.currentGame.myTotalScore = 0;
			foreach(Round r in Flow.currentGame.myRoundList)
			{
				Flow.currentGame.myTotalScore += r.score;
			}
			
			for(int i = 0; i<friendTimes.Length; i++) friendTimes[i].Text = "";
			friendScore.Text = "Waiting...";
			for(int i = 0; i<userTimes.Length; i++)
			{
				userTimes[i].Text = "Time " + (i+1).ToString() + ": " + Flow.currentGame.myRoundList[i].time.ToString();
			}
		}
		else if(Flow.path == TurnStatus.AnswerGame)
		{	
			Flow.currentGame.myTotalScore = 0;
			foreach(Round r in Flow.currentGame.myRoundList)
			{
				Flow.currentGame.myTotalScore += r.score;
			}
			Flow.currentGame.theirTotalScore = 0;
			foreach(Round r in Flow.currentGame.theirRoundList)
			{
				Flow.currentGame.theirTotalScore += r.score;
			}
			
			for(int i = 0; i<friendTimes.Length; i++)
			{
				friendTimes[i].Text = "Time " + (i+1).ToString() + ": " + Flow.currentGame.theirRoundList[i].time.ToString();
			}
			friendScore.Text = "Score: " + Flow.currentGame.theirTotalScore.ToString();
			for(int i = 0; i<userTimes.Length; i++)
			{
				userTimes[i].Text = "Time " + (i+1).ToString() + ": " + Flow.currentGame.myRoundList[i].time.ToString();
			}
		}
		else if(Flow.path == TurnStatus.ShowPast)
		{
			Flow.currentGame.myTotalScore = 0;
			foreach(Round r in Flow.currentGame.pastMyRoundList)
			{
				Flow.currentGame.myTotalScore += r.score;
			}
			Flow.currentGame.theirTotalScore = 0;
			foreach(Round r in Flow.currentGame.pastTheirRoundList)
			{
				Flow.currentGame.theirTotalScore += r.score;
			}
			
			Debug.Log(Flow.currentGame.pastTheirRoundList.Count);
			
			for(int i = 0; i<friendTimes.Length; i++)
			{
				friendTimes[i].Text = "Time " + (i+1).ToString() + ": " + Flow.currentGame.pastTheirRoundList[i].time.ToString();
			}
			friendScore.Text = "Score: " + Flow.currentGame.theirTotalScore.ToString();
			for(int i = 0; i<userTimes.Length; i++)
			{
				userTimes[i].Text = "Time " + (i+1).ToString() + ": " + Flow.currentGame.pastMyRoundList[i].time.ToString();
			}
			
			ShowPastPanel();
		}
		
		userName.Text = Save.GetString(PlayerPrefsKeys.NAME.ToString());
		friendName.Text = Flow.currentGame.friend.name;
		turnsLost.Text = "Victories: " + Flow.currentGame.turnsLost.ToString();
		turnsWon.Text = "Defeats: " + Flow.currentGame.turnsWon.ToString();
		userScore.Text = "Score: " + Flow.currentGame.myTotalScore.ToString();
	}
	// Sets the control to its disabled appearance:
	protected void DisableMe()
	{
		this.UseStateLabel(states.Length - 1);

		// End any current transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		transitions[states.Length - 1].list[0].Start();
		prevTransition = transitions[states.Length - 1].list[0];
	}
예제 #52
0
	void DismissFirstPastPanel(EZTransition transition)
	{
		firstPastPanel.transitions.list[2].AddTransitionEndDelegate(BringSecondPastPanel);
		firstPastPanel.Dismiss();
	}
예제 #53
0
	public override void Copy(SpriteRoot s, ControlCopyFlags flags)
	{
		base.Copy(s, flags);

		if (!(s is UIRadioBtn))
			return;

		UIRadioBtn b = (UIRadioBtn)s;

		if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
		{
			state = b.state;
			prevTransition = b.prevTransition;
			if (Application.isPlaying)
				Value = b.Value;
		}

		if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
		{
			group = b.group;
			defaultValue = b.defaultValue;
		}

		if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
		{
			scriptWithMethodToInvoke = b.scriptWithMethodToInvoke;
			methodToInvoke = b.methodToInvoke;
			whenToInvoke = b.whenToInvoke;
			delay = b.delay;
		}

		if ((flags & ControlCopyFlags.Sound) == ControlCopyFlags.Sound)
		{
			soundToPlay = b.soundToPlay;
		}
	}
예제 #54
0
	// Gets called when our transition is complete
	public void TransitionCompleted(EZTransition transition)
	{
		prevTransition = null;

		// Deactivate all child objects?
		if (deactivateAllOnDismiss)
		{
			// If this was a dismissal:
			if (transition == Transitions.list[2] ||
			   transition == Transitions.list[3])
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
				gameObject.SetActive(false);
#else
				gameObject.SetActiveRecursively(false);
#endif
		}

		if (tempTransCompleteDel != null)
			tempTransCompleteDel(this, transition);
		tempTransCompleteDel = null;

		if (changeDelegate != null)
			changeDelegate(this);

		if (blockInput[prevTransIndex] && UIManager.Exists())
			UIManager.instance.UnlockInput();
	}
예제 #55
0
	/// <summary>
	/// Starts the transition matching the specified name (case-insensitive).
	/// </summary>
	/// <param name="transName">The name of the transition to start.  Ex: "Bring In Forward"</param>
	public virtual void StartTransition(string transName)
	{
		if (!m_started)
			Start();

		EZTransition[] list = Transitions.list;

		for (int i = 0; i < list.Length; ++i)
			if (string.Equals(list[i].name, transName, System.StringComparison.CurrentCultureIgnoreCase))
			{
				// Finish any pending transition:
				if (prevTransition != null)
					prevTransition.StopSafe();

				prevTransIndex = i;

				if (blockInput[prevTransIndex])
					UIManager.instance.LockInput();

				prevTransition = list[prevTransIndex];

				// Activate all children, if we were set to deactivate
				// them on dismissal:
				if (deactivateAllOnDismiss)
				{
					if (prevTransition == list[(int)UIPanelManager.SHOW_MODE.BringInBack] ||
						prevTransition == list[(int)UIPanelManager.SHOW_MODE.BringInForward])
					{
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
						gameObject.SetActive(true);
#else
						gameObject.SetActiveRecursively(true);
#endif
						Start();
					}
				}

				prevTransition.Start();
			}
	}
예제 #56
0
	void DismissSecondPastPanel(EZTransition transition)
	{
		lastPastPanel.transitions.list[2].AddTransitionEndDelegate(StartGame);
		lastPastPanel.Dismiss();
	}
예제 #57
0
	/// <summary>
	/// Sets the button's toggle state to the specified state.
	/// </summary>
	/// <param name="s">The zero-based state number/index.</param>
	/// <param name="suppressTransition">Whether or not to suppress transitions when changing states.</param>
	public virtual void SetToggleState(int s, bool suppressTransition)
	{
		curStateIndex = s % (states.Length - 1);

		// First see if we need to postpone this state
		// change for when we are active:
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
		if (!gameObject.activeInHierarchy)
#else
		if (!gameObject.active)
#endif
		{
			stateChangeWhileDeactivated = true;

			// Call our changed delegate:
			if (changeDelegate != null)
				changeDelegate(this);

			return;
		}

		this.SetState(curStateIndex);

		this.UseStateLabel(curStateIndex);

		// Recalculate our collider
		UpdateCollider();

		SetLayerState(curStateIndex);

		// Loop through each layer and set its state,
		// provided we have a valid index for that state:
		for (int i = 0; i < layers.Length; ++i)
		{
			if (-1 != stateIndices[i, curStateIndex])
			{
				layers[i].Hide(IsHidden());
				layers[i].SetState(stateIndices[i, curStateIndex]);
			}
			else
				layers[i].Hide(true);
		}

		// End any current transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		if (!suppressTransition)
		{
			transitions[curStateIndex].list[0].Start();
			prevTransition = transitions[curStateIndex].list[0];
		}

		// Call our changed delegate:
		if (changeDelegate != null && !stateChangeWhileDeactivated)
			changeDelegate(this);
	}
예제 #58
0
	void EnteredMenu(EZTransition transition)
	{
		Flow.header.transform.FindChild("OptionsPanel").gameObject.SetActive(false);
		
		Flow.currentMode = GameMode.None;
	}
예제 #59
0
	// Called when the loading panel's transition ends.
	public void LoadSceneDelegate(UIPanelBase panel, EZTransition trans)
	{
		StartCoroutine(LoadScene());
	}
예제 #60
0
	/// <summary>
	/// Starts one of the panel's "bring in" or "dismiss" transitions.
	/// </summary>
	/// <param name="mode">The mode corresponding to the transition that should be played.</param>
	public virtual void StartTransition(UIPanelManager.SHOW_MODE mode)
	{
		if (!m_started)
			Start();

		// Finish any pending transition:
		if (prevTransition != null)
			prevTransition.StopSafe();

		prevTransIndex = (int)mode;

		if (blockInput[prevTransIndex])
			UIManager.instance.LockInput();

		prevTransition = Transitions.list[prevTransIndex];

		// Activate all children, if we were set to deactivate
		// them on dismissal:
		if (deactivateAllOnDismiss)
		{
			if (mode == UIPanelManager.SHOW_MODE.BringInBack ||
				mode == UIPanelManager.SHOW_MODE.BringInForward)
			{
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
				gameObject.SetActive(true);
#else
				gameObject.SetActiveRecursively(true);
#endif
				Start();
			}
		}

		prevTransition.Start();
	}