コード例 #1
0
ファイル: IceAbility.cs プロジェクト: Yunshiyue/ElementGame
 public void FreezingZone(BoxCollider2D abilityCollider)
 {
     Debug.Log("进入了冰冻函数");
     Collider2D[] waterColliders = new Collider2D[8];
     if (abilityCollider.OverlapCollider(filter, waterColliders) != 0)
     {
         Debug.Log(string.Format("冻到了水域{0}", waterColliders[0].name));
         BoxCollider2D waterCollider    = (BoxCollider2D)waterColliders[0];
         BoxCollider2D freezingCollider = poolManager.GetGameObject(IceFreezingZoneName).GetComponent <BoxCollider2D>();
         freezingCollider.gameObject.SetActive(true);
         freezingCollider.GetComponent <IceDisappear>().SetPoolManger(poolManager);
         ColliderBoundsCalculator.SetColliderSizeAndPositionByRect(freezingCollider, ColliderBoundsCalculator.GetColliderIntersection(abilityCollider, waterCollider));
     }
 }
コード例 #2
0
 private void doit()
 {
     ColliderBoundsCalculator.SetColliderSizeAndPositionByRect(c, ColliderBoundsCalculator.GetColliderIntersection(a, b));
 }