예제 #1
0
		public MenkoBattleData(uint id, bool isPlayer, bool isRepresent)
		{
			this.isRepresent = isRepresent;
			this.isPlayer = isPlayer;
			baseData = AssetManager.Load(AssetPath.GetMonsterDataPath(id)).Asset as MenkoData;
			skillData = AssetManager.Load(AssetPath.GetSkillDataPath(baseData.Character.SkillID)).Asset as SkillData;
			status = new BattleStatus(baseData.Status, skillData);
		}
예제 #2
0
 public MenkoBattleData(uint id, bool isPlayer, bool isRepresent)
 {
     this.isRepresent = isRepresent;
     this.isPlayer    = isPlayer;
     baseData         = AssetManager.Load(AssetPath.GetMonsterDataPath(id)).Asset as MenkoData;
     skillData        = AssetManager.Load(AssetPath.GetSkillDataPath(baseData.Character.SkillID)).Asset as SkillData;
     status           = new BattleStatus(baseData.Status, skillData);
 }
예제 #3
0
        /// <summary>
        /// ダメージ加算
        /// </summary>
        public void Damage(BattleStatus opStatus, float posMagnif, Vector3 pos)
        {
            const int LV         = 100;     // 今のところ固定
            float     elementMag = MenkoElementUtils.GetMagnification(opStatus.Element, this.Element);
            float     attackBase = (LV * 0.4f + 2) * opStatus.Attack * elementMag;
            float     difensed   = attackBase / (this.Difense * 0.75f);
            int       damage     = Mathf.CeilToInt(difensed * posMagnif);

            Percent += damage;
            DamageToaster.Instance.ShowDamage(damage, pos);
        }
예제 #4
0
파일: Menko.cs 프로젝트: K-Yoshiki/menko
		public void Damage(BattleStatus status, float posMagnif)
		{
			data.Status.Damage(status, posMagnif, transform.position);
			components.AddForce(Vector3.up * 0.01f * data.Status.Percent, ForceMode.Impulse);
			components.AddTorque(Vector3.right * 0.1f * data.Status.Percent, ForceMode.Impulse);
		}
예제 #5
0
		/// <summary>
		/// ダメージ加算
		/// </summary>
		public void Damage(BattleStatus opStatus, float posMagnif, Vector3 pos)
		{
			const int LV = 100; // 今のところ固定
			float elementMag = MenkoElementUtils.GetMagnification(opStatus.Element, this.Element);
			float attackBase = (LV * 0.4f + 2) * opStatus.Attack * elementMag;
			float difensed = attackBase / (this.Difense * 0.75f);
			int damage = Mathf.CeilToInt(difensed * posMagnif);
			Percent += damage;
			DamageToaster.Instance.ShowDamage(damage, pos);
		}
예제 #6
0
 public void Damage(BattleStatus status, float posMagnif)
 {
     data.Status.Damage(status, posMagnif, transform.position);
     components.AddForce(Vector3.up * 0.01f * data.Status.Percent, ForceMode.Impulse);
     components.AddTorque(Vector3.right * 0.1f * data.Status.Percent, ForceMode.Impulse);
 }