Exemplo n.º 1
0
 /*
 /// <summary>
 /// 初始化玩家施法
 /// </summary>
 protected override void InitSpell()
 {
     base.InitSpell();
     //初始化主動施法
     InitActivitySpell();
 }
 */
 /// <summary>
 /// 初始化主動施法
 /// </summary>
 void InitActivitySpell()
 {
     ActivitySpells = new ActivitySpell[2];
     string activitySpellListStr = AttrsDic["ActivitySpellList"];
     string[] spellIDStr = activitySpellListStr.Split(',');
     for (int i = 0; i < spellIDStr.Length; i++)
     {
         if (i > 2)
         {
             Debug.LogWarning("腳色有超過2招主動技能");
             break;
         }
         int spellID = int.Parse(spellIDStr[i]);
         ActivitySpell spell = new ActivitySpell(spellID, this);
         ActivitySpells[i] = spell;
         ASpellNum++;
     }
 }
Exemplo n.º 2
0
    /*
     * /// <summary>
     * /// 初始化玩家施法
     * /// </summary>
     * protected override void InitSpell()
     * {
     *  base.InitSpell();
     *  //初始化主動施法
     *  InitActivitySpell();
     * }
     */
    /// <summary>
    /// 初始化主動施法
    /// </summary>
    void InitActivitySpell()
    {
        ActivitySpells = new ActivitySpell[2];
        string activitySpellListStr = AttrsDic["ActivitySpellList"];

        string[] spellIDStr = activitySpellListStr.Split(',');
        for (int i = 0; i < spellIDStr.Length; i++)
        {
            if (i > 2)
            {
                Debug.LogWarning("腳色有超過2招主動技能");
                break;
            }
            int           spellID = int.Parse(spellIDStr[i]);
            ActivitySpell spell   = new ActivitySpell(spellID, this);
            ActivitySpells[i] = spell;
            ASpellNum++;
        }
    }
Exemplo n.º 3
0
 public void Init(ActivitySpell _spell)
 {
     MyGameobject = gameObject;
     if (_spell == null)
     {
         HideUI();
         return;
     }
     MySpell      = _spell;
     Image_Icon   = transform.FindChild("icon").GetComponent <Image>();
     Image_Bottom = transform.FindChild("bottom").GetComponent <Image>();
     Image_Cover  = transform.FindChild("cover").GetComponent <Image>();
     //設定Icon圖
     SetIcon();
     //設定底圖顏色
     SetBottomColor(MySpell.Type);
     //初始設定無CD
     Image_Cover.fillAmount = 0;
     IsInit = true;
 }
Exemplo n.º 4
0
 public void Init(ActivitySpell _spell)
 {
     MyGameobject = gameObject;
     if (_spell == null)
     {
         HideUI();
         return;
     }
     MySpell = _spell;
     Image_Icon = transform.FindChild("icon").GetComponent<Image>();
     Image_Bottom = transform.FindChild("bottom").GetComponent<Image>();
     Image_Cover = transform.FindChild("cover").GetComponent<Image>();
     //設定Icon圖
     SetIcon();
     //設定底圖顏色
     SetBottomColor(MySpell.Type);
     //初始設定無CD
     Image_Cover.fillAmount = 0;
     IsInit = true;
 }