public void AddCD(int skillID, CdType cdType, float cdTime) { PlayerSkillCDVO cdVO = null; if (cdType == CdType.Ship) { cdVO = shipCDVO; } else if (cdType == CdType.Skill) { if (!m_SkillCDDic.TryGetValue(skillID, out cdVO)) { cdVO = new PlayerSkillCDVO(skillID, cdType); m_SkillCDDic.Add(skillID, cdVO); } } if (cdVO != null) { cdVO.SetCD(cdTime); SendNotification(NotificationName.MSG_SHIP_SKILL_CD_CHANGED); } }
public PlayerSkillCDVO(int skillID, CdType cdType) : this(cdType) { this.m_SkillID = skillID; }
public PlayerSkillCDVO(CdType cdType) { m_CdType = cdType; m_StartTime = m_EndTime = Time.unscaledTime; }