public override void Init(IntVector4 idx, Transform parent = null, int spid = 0, int pathid = 0, bool isActive = true, bool revisePos = true, bool isBoss = false, bool isErode = true, bool isDelete = true, SimplexNoise noise = null, AssetReq.ReqFinishDelegate onSpawned = null, CommonInterface common = null) { base.Init(idx, parent, spid, pathid, isActive, revisePos, isBoss, isErode, isDelete, noise, onSpawned, common); if (pathid > 0) { AiAsset.AiDataBlock aiData = AiAsset.AiDataBlock.GetAIDataBase(pathid); if (aiData != null) { //mDamage = aiData.damageSimulate; mMaxHp = aiData.maxHpSimulate; mHp = mMaxHp; } } if (spid > 0) { AISpawnPath path = AISpawnPath.GetSpawnPath(spid); { if (path != null) { //mDamage = path.damage; mMaxHp = path.maxHp; mHp = mMaxHp; } } } }
int GetPathIDFromSPID(int spid) { int tid = typeID; if (mTDInfo != null) { if (mType == PointType.PT_Water && !AiUtil.CheckPositionUnderWater(mTDInfo.position)) { tid = 4; } if (Mathf.Abs(position.y - mTDInfo.position.y) > 64.0f) { tid = 4; } } return(AISpawnPath.GetPathID(spid, tid)); }