コード例 #1
0
ファイル: SpikeCross.cs プロジェクト: Grimnak/LoZGame
 public override void OnCollisionResponse(ICollider otherCollider, CollisionDetection.CollisionSide collisionSide)
 {
     if (otherCollider is IPlayer)
     {
         EnemyCollisionHandler.OnCollisionResponse((IPlayer)otherCollider, collisionSide);
     }
 }
コード例 #2
0
ファイル: RedGohma.cs プロジェクト: Grimnak/LoZGame
 public override void OnCollisionResponse(ICollider otherCollider, CollisionDetection.CollisionSide collisionSide)
 {
     if (otherCollider is IPlayer)
     {
         EnemyCollisionHandler.OnCollisionResponse((IPlayer)otherCollider, collisionSide);
     }
     else if (otherCollider is IBlock)
     {
         EnemyCollisionHandler.OnCollisionResponse((IBlock)otherCollider, collisionSide);
     }
     else if (otherCollider is IProjectile && CurrentState is OpenEyeState)
     {
         EnemyCollisionHandler.OnCollisionResponse((IProjectile)otherCollider, collisionSide);
     }
 }
コード例 #3
0
ファイル: WallMaster.cs プロジェクト: Grimnak/LoZGame
 public override void OnCollisionResponse(ICollider otherCollider, CollisionDetection.CollisionSide collisionSide)
 {
     if (otherCollider is IPlayer && !(((Link)otherCollider).State is PickupItemState || CurrentState is StunnedEnemyState) && !LoZGame.Instance.Players[0].Inventory.HasClock)
     {
         CurrentState.Attack();
     }
     else if (otherCollider is IBlock && !(CurrentState is AttackingWallMasterState))
     {
         EnemyCollisionHandler.OnCollisionResponse((IBlock)otherCollider, collisionSide);
     }
     else if (otherCollider is IProjectile && Timer <= 100)
     {
         EnemyCollisionHandler.OnCollisionResponse((IProjectile)otherCollider, collisionSide);
     }
 }
コード例 #4
0
 public virtual void OnCollisionResponse(ICollider otherCollider, CollisionDetection.CollisionSide collisionSide)
 {
     if (otherCollider is IPlayer)
     {
         EnemyCollisionHandler.OnCollisionResponse((IPlayer)otherCollider, collisionSide);
     }
     else if (otherCollider is IBlock)
     {
         EnemyCollisionHandler.OnCollisionResponse((IBlock)otherCollider, collisionSide);
     }
     else if (otherCollider is IProjectile)
     {
         EnemyCollisionHandler.OnCollisionResponse((IProjectile)otherCollider, collisionSide);
     }
 }
コード例 #5
0
 public virtual void OnCollisionResponse(int sourceWidth, int sourceHeight, CollisionDetection.CollisionSide collisionSide)
 {
     EnemyCollisionHandler.OnCollisionResponse(sourceWidth, sourceHeight, collisionSide);
 }