public EntityPart(float damageCoeff, EntityPartType part, List <EntityPartType> connectedParts, EntitySize size, float progressiveDmgSpeed = 0) { this.damageCoeff = damageCoeff; this.partType = part; this.progressiveDmgSpeed = progressiveDmgSpeed; this.adjPartsType = connectedParts; this.size = size; }
//外部接口 public GameObject getPartByType(EntityPartType type) { GameObject part = null; if (dictPart.ContainsKey(type)) { part = dictPart[type].getPartObj(); } return(part); }
public virtual GameObject getPartObj(EntityPartType type) { return(this.partWidget.getPartByType(type)); }