public void OnEnter(Collider other, Transform src) { _status = this.DetectedStatus(); //DebugWide.LogBlue ("sdfsdfsf"); this.ComputeIKTarget(null, other, src); }
public void OnEnter(Collision collision, Transform src) { cpList = collision.contacts; _status = this.DetectedStatus(); if (_status == eCollisionStatus.Hit || _status == eCollisionStatus.Block_Objects || _status == eCollisionStatus.Block_Weapon) { if (0 != cpList.Length) { this.ComputeIKTarget(collision, collision.collider, src); CounterBlock.Single.particle.PlayDamage(cpList[0].point); } } }
public void OnExit(Collider other, Transform src) { _status = this.DetectedStatus(); }
public eCollisionStatus DetectedStatus() { //* body head sword knife //myBody <- body : my block_body //myBody <- weapon : my damage //myBody <- knife : my damage //myHead <- weapon : my damage //myWeapon -> body : opponent damage //myWeapon -> weapon: opponent block_weapon //========================================== eCollisionStatus detect = eCollisionStatus.None; switch (this._myColliderKind) { case eColliderKind.Body: { //1.myBody <- body : my block_body if (eColliderKind.Body == this._oppColliderKind) { detect = eCollisionStatus.Block_Body; } if (eColliderKind._HandLeft == this._oppColliderKind) { detect = eCollisionStatus.Block_Body; } if (eColliderKind._HandRight == this._oppColliderKind) { detect = eCollisionStatus.Block_Body; } if (eColliderKind._Head == this._oppColliderKind) { detect = eCollisionStatus.Block_Body; } //2.myBody <- weapon : my damage if (eColliderKind.Weapon == this._oppColliderKind) { detect = eCollisionStatus.Damage; } } break; //3.myWeapon -> weapon : opponent block_weapon case eColliderKind.Weapon: { if (eColliderKind.Weapon == this._oppColliderKind) { detect = eCollisionStatus.Block_Weapon; } if (eColliderKind.Body == this._oppColliderKind) { detect = eCollisionStatus.Hit; } if (eColliderKind._HandLeft == this._oppColliderKind) { detect = eCollisionStatus.Hit; } if (eColliderKind._HandRight == this._oppColliderKind) { detect = eCollisionStatus.Hit; } if (eColliderKind._Head == this._oppColliderKind) { detect = eCollisionStatus.Hit; } if (eColliderKind.Objects == this._oppColliderKind) { detect = eCollisionStatus.Block_Objects; } } break; } return(detect); }