Exemplo n.º 1
0
        /** 生成处理器 */
        public void Generation()
        {
            int[] stars = War.sceneData.stageConfig.stars;
//			Debug.Log(string.Format("<color=yello>Generation stars={0}</color>", stars.ToStr ()));
            int count = 0;

            foreach (int starId in stars)
            {
                if (starId < 1)
                {
                    continue;
                }
                count++;
                StarConfig starConfig = War.model.GetStarConfig(starId);

                Type type;
                if (ProcessorConfig.TryGetValue(starConfig.starType, out type))
                {
                    StarProcessor processor = gameObject.AddComponent(type) as StarProcessor;
                    processor.Init(starConfig);
                    list.Add(processor);
                }
            }

            if (count == 0)
            {
                getPanel.gameObject.SetActive(false);
            }
        }
        public override void Init(StarConfig starConfig)
        {
            base.Init(starConfig);

            processParameters    = new object[1];
            processParameters[0] = starConfig.parameters[0];
        }
Exemplo n.º 3
0
        public void Open(StarConfig config)
        {
            if (gameObject.activeSelf == false)
            {
                return;
            }

            starConfigs.Enqueue(config);
            CheckOpen();
        }
Exemplo n.º 4
0
        public void Show()
        {
            if (starConfigs.Count > 0)
            {
                StarConfig config = starConfigs.Dequeue() as StarConfig;

                if (War.config.isShowStarMsg)
                {
                    War.msgBox.Show_Text(config.Description);
                }

                if (activeCount < starIcons.Length)
                {
                    StartCoroutine(DelayActiveIcon(starIcons[activeCount++]));
                }

                isOpening = true;
            }
        }
Exemplo n.º 5
0
        /** 生成处理器 */
        public void Generation()
        {
            int[] stars = War.sceneData.stageConfig.stars;
            foreach (int starId in stars)
            {
                if (starId < 1)
                {
                    continue;
                }
                StarConfig starConfig = War.model.GetStarConfig(starId);

                Type type;
                if (ProcessorConfig.TryGetValue(starConfig.starType, out type))
                {
                    StarProcessor processor = gameObject.AddComponent(type) as StarProcessor;
                    processor.legionData = legionData;
                    processor.Init(starConfig);
                    list.Add(processor);
                }
            }
        }
Exemplo n.º 6
0
        public void Show()
        {
            if (starConfigs.Count > 0)
            {
                StarConfig config = starConfigs.Dequeue() as StarConfig;
                text.text = config.Description;
            }

            isOpen    = true;
            isTwening = true;
            gameObject.SetActive(true);
            transform.SetAsLastSibling();
            content.localScale         = Vector3.zero;
            content.rotation           = Quaternion.Euler(new Vector3(0F, 180F, 0F));
            content.anchoredPosition3D = new Vector3(Screen.width, 0f, 0f);


            iTween.ScaleTo(content.gameObject, iTween.Hash("time", 0.3f,
                                                           "delay", 0.0f,
                                                           "easetype", iTween.EaseType.linear,
                                                           "scale", Vector3.one,
                                                           "oncomplete", "ShowEnd",
                                                           "oncompletetarget", gameObject));

            iTween.MoveTo(content.gameObject, iTween.Hash("time", 0.3f,
                                                          "delay", 0.0f,
                                                          "easetype", iTween.EaseType.linear,
                                                          "position", p
                                                          ));



            iTween.RotateTo(content.gameObject, iTween.Hash("time", 0.3f,
                                                            "delay", 0.0f,
                                                            "easetype", iTween.EaseType.linear,
                                                            "rotation", Vector3.zero
                                                            ));
        }
Exemplo n.º 7
0
 virtual public void Init(StarConfig starConfig)
 {
     this.starConfig = starConfig;
 }
Exemplo n.º 8
0
 public void Open(StarConfig config)
 {
     starConfigs.Enqueue(config);
     CheckOpen();
 }
Exemplo n.º 9
0
 public void AddStarConfig(StarConfig config)
 {
     starConfigs.Add(config.id, config);
 }