Beispiel #1
0
 public void Init(GameObject game_object, CollisionLayer layer, CollisionPushType push, int find_layer)
 {
     collision_push_type_ = push;
     collision_type_      = layer;
     RpgCollisionConnection.AddCollisionConstruction(this);
     rpg_collision_details_control_ = new RpgCollisionDetailsControl();
     this_object_ = game_object;
     rpg_collision_details_control_.Init(this_object_);
     rpg_collision_details_control_.AutoAddCollisionDetails(this, find_layer);
 }
Beispiel #2
0
 /// <summary>
 /// 押し出し計算
 /// </summary>
 /// <param name="type"></param>
 /// <param name="this_collider"></param>
 /// <param name="opponent_collider"></param>
 /// <param name="pushBackVector"></param>
 /// <param name="pushBackDistance"></param>
 /// <returns></returns>
 public static bool ComputePenetration(CollisionPushType type, Collider this_collider, Vector3 position, Collider opponent_collider, Vector3 opponent_position, ref Vector3 pushBackVector, ref float pushBackDistance)
 {
     if (type == CollisionPushType.kThisPush)
     {
         return(ComputePenetrationThisPush(this_collider, position, opponent_collider, opponent_position, ref pushBackVector, ref pushBackDistance));
     }
     else
     {
         return(ComputePenetrationOpponentPush(this_collider, position, opponent_collider, opponent_position, ref pushBackVector, ref pushBackDistance));
     }
 }