Beispiel #1
0
                } // end SfixBossChase

                public override void DoBeforeEntering()
                {
                    timer    = 0;
                    interval = Random.Range(1f, 5f);
                    base.DoBeforeEntering();
                    modle = skill.GetSkillModle(SfixSkill_1.ID);
                } // end DoBeforeEntering
Beispiel #2
0
            } // end PushSkill

            public ISkillModle[] GetSkillModleArray() {
                if (0 == skillList.Count) return null;
                // end if
                ISkillModle[] modleArr = new ISkillModle[skillList.Count];
                for (int i = 0; i < skillList.Count; i++) {
                    modleArr[i] = skillList[i];
                } // end for
                return modleArr;
            } // end GetSkillIDArray
Beispiel #3
0
 public UISkill(ISkillModle modle, RectTransform parent, Vector3 localPos, Vector2 iconSize)
 {
     this.modle  = modle;
     transfrom   = CanvasTool.InstantiateEmptyUI("uiskill", parent, localPos).GetComponent <RectTransform>();
     icon        = CanvasTool.InstantiateImage(modle.info.id, transfrom, Vector3.zero, iconSize);
     icon.sprite = ResourcesTool.LoadSprite(modle.info.spritepath);
     icon.gameObject.AddComponent <UIButton>().AddListener(CastSkill);
     icon.raycastTarget = true;
     mask               = CanvasTool.InstantiateImage("mask", icon.rectTransform, Vector3.zero, iconSize);
     mask.sprite        = icon.sprite;
     timeText           = CanvasTool.InstantiateText("timer", transfrom, iconSize);
     timeText.font      = Font.CreateDynamicFontFromOSFont("Arial", 32);
     timeText.fontSize  = 32;
     timeText.color     = Color.red;
     timeText.alignment = TextAnchor.MiddleCenter;
     mask.color         = new Color(0, 0, 0, 0.5f);
     mask.type          = Image.Type.Filled;
     mask.fillMethod    = Image.FillMethod.Radial360;
     mask.fillOrigin    = 2;
     mask.fillClockwise = false;
     mask.fillAmount    = 0;
 } // end Icon