public void ExecEventsFromCol(Pathea.PECapsuleHitResult colInfo) // exetern call { if (_bExecExtEnable) { SkEntity tar = (SkEntity)colInfo.hitTrans; if (tar != null && !_hitInGuide.Contains(tar) && (_target == null || _target == tar)) { _colInfo = colInfo; foreach (SkTriggerEvent skEvent in _eventsActFromCol) { if (skEvent.Exec(this)) { _hitInGuide.Add(tar); break; // filter left skevent if needed } } //Debug.Log("[Skill] Hit:" + _hit); } } #if DBG_COL_ATK else { Debug.Log("Event not executed because in " + _dbgStep); } #endif }
public bool Contain(Pathea.PECapsuleHitResult colInfo) { string strCol0 = (colTypes[0] == ColType.ColName) ? colInfo.selfTrans.name : LayerMask.LayerToName(colInfo.selfTrans.gameObject.layer); string strCol1 = (colTypes[1] == ColType.ColName) ? colInfo.hitTrans.name : LayerMask.LayerToName(colInfo.hitTrans.gameObject.layer); if (colStrings[0][0].Length == 0 || colStrings[0].Contains(strCol0)) { if (colStrings[1][0].Length == 0 || colStrings[1].Contains(strCol1)) { return(true); } #if DBG_COL_ATK string log = "FAILED Target Col:" + strCol1 + "|"; foreach (string str in colStrings[1]) { log += str + ","; } Debug.Log(log); #endif return(false); } #if DBG_COL_ATK string log = "FAILED Target Col:" + strCol0 + "|"; foreach (string str in colStrings[0]) { log += str + ","; } Debug.Log(log); #endif return(false); }
public void CollisionCheck(Pathea.PECapsuleHitResult colInfo) { int n = _instsActFromExt.Count; for (int i = 0; i < n; i++) { _instsActFromExt[i].ExecEventsFromCol(colInfo); } }
public static RagdollHitInfo CapsuleHitToRagdollHit(Pathea.PECapsuleHitResult hitResult) { RagdollHitInfo hitInfo = new RagdollHitInfo(); hitInfo.hitTransform = hitResult.hitTrans; hitInfo.hitPoint = hitResult.hitPos; hitInfo.hitForce = hitResult.hitDir * 1000.0f; return(hitInfo); }
// Collision test public void CollisionCheck(Collider selfCol, Collider otherCol) { Pathea.PECapsuleHitResult colInfo = new Pathea.PECapsuleHitResult(); colInfo.selfTrans = selfCol.transform; colInfo.hitTrans = otherCol.transform; // Other var evaluate int n = _instsActFromExt.Count; for (int i = 0; i < n; i++) { _instsActFromExt[i].ExecEventsFromCol(colInfo); } }