72 lines
1.8 KiB
C#
72 lines
1.8 KiB
C#
|
using Cal;
|
|||
|
using Cal.DataTable;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
public class SkillLogic : Entity
|
|||
|
{
|
|||
|
public int skillId => skillLogicConfig.skillId;
|
|||
|
|
|||
|
public int skillLevel;
|
|||
|
public int skillConfigId => skillLogicConfig.skillId * 100 + skillLevel;
|
|||
|
|
|||
|
public Unit owner;
|
|||
|
|
|||
|
public SkillLogicConfig skillLogicConfig;
|
|||
|
|
|||
|
public SkillConfig skillConfig;
|
|||
|
|
|||
|
private SkillAI _skillAI;
|
|||
|
public SkillAI skillAI
|
|||
|
{
|
|||
|
get => _skillAI ??= owner.GetComponent<SkillAI>();
|
|||
|
set => _skillAI = value;
|
|||
|
}
|
|||
|
public long lastCDTime;
|
|||
|
|
|||
|
public float dataX10000 = 1;
|
|||
|
public float dataOldX10000 = 1;
|
|||
|
|
|||
|
private AttackComponent attacker;
|
|||
|
/// <summary>
|
|||
|
/// 伤害倍数
|
|||
|
/// </summary>
|
|||
|
public float multipleDamageX10000
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
attacker ??= owner.GetComponent<AttackComponent>();
|
|||
|
if (attacker == null)
|
|||
|
{
|
|||
|
Log.ErrorDetail($"attacker == null");
|
|||
|
}
|
|||
|
return attacker.multipleDamageX10000;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
if (attacker)
|
|||
|
attacker.multipleDamageX10000 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
/// <summary>
|
|||
|
/// 释放次数
|
|||
|
/// </summary>
|
|||
|
public int playAmount
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
attacker ??= owner.GetComponent<AttackComponent>();
|
|||
|
return attacker.playAmount;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
if (attacker)
|
|||
|
attacker.playAmount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
public List<SkillOptionLogicBase> skillOptionLogics = new List<SkillOptionLogicBase>();
|
|||
|
}
|
|||
|
}
|