コード例 #1
0
	private ColliderRecord RecordCollider(Collider collider, StageObject obj, BulletObject bullet)
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Expected O, but got Unknown
		//IL_014f: Expected O, but got Unknown
		ColliderRecord colliderRecord = null;
		if (records.Count >= 20)
		{
			colliderRecord = records.Last.Value;
			records.RemoveLast();
		}
		else
		{
			colliderRecord = new ColliderRecord();
		}
		colliderRecord.time = Time.get_time();
		colliderRecord.pos = collider.get_transform().get_position();
		colliderRecord.forward = collider.get_transform().get_forward();
		colliderRecord.angle = AIUtility.GetAngle360OfTargetPos(brain.owner, colliderRecord.pos);
		colliderRecord.radius = 1f;
		if (collider is SphereCollider)
		{
			colliderRecord.radius = (collider as SphereCollider).get_radius();
		}
		else if (collider is CapsuleCollider)
		{
			CapsuleCollider val = collider as CapsuleCollider;
			colliderRecord.radius = Mathf.Max(val.get_radius(), val.get_height());
		}
		colliderRecord.isDash = false;
		Enemy enemy = obj as Enemy;
		if (enemy != null)
		{
			colliderRecord.isDash = enemy.enableDash;
		}
		colliderRecord.isBullet = (bullet != null);
		colliderRecord.isWillHit = false;
		if (colliderRecord.isMove)
		{
			nearMoveTime = colliderRecord.time;
			int opponentMask = AIUtility.GetOpponentMask(obj);
			colliderRecord.isWillHit = AIUtility.IsHitObjectFromMoveObject(collider.get_transform(), brain.owner.get_transform(), colliderRecord.radius, opponentMask);
			if (colliderRecord.isWillHit)
			{
				if (colliderRecord.isDash)
				{
					nearWillDashHitTime = colliderRecord.time;
				}
				if (colliderRecord.isBullet)
				{
					nearWillBulletHitTime = colliderRecord.time;
				}
			}
		}
		records.AddFirst(colliderRecord);
		return colliderRecord;
	}