コード例 #1
0
    IEnumerator PassiveSkill(SkillInfo info)
    {
        GameObject efxPrefab = null;

        efxDictionary.TryGetValue(info.efx_name, out efxPrefab);
        GameObject.Instantiate(efxPrefab, this.transform.position, Quaternion.identity);
        yield return(new WaitForSeconds(info.animTime));

        PlayerInformation.playerInformation.playerState = PlayerState.Idle;
        if (info.applyProperty == ApplyProperty.HP)
        {
            playerInformation.AddHp(info.applyValue);
        }
        else if (info.applyProperty == ApplyProperty.MP)
        {
            playerInformation.AddMp(info.applyValue);
        }
    }
コード例 #2
0
ファイル: MyDrag.cs プロジェクト: anxiaoyuLiu/SimpleRPG
 public void MpBottle()
 {
     information.AddMp(50);
     Destroy(this.gameObject);
 }