Skip to content

Commit

Permalink
feat: [クラスラッパー]MapObjectList.GoToメソッドを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic9045 committed Jun 28, 2023
1 parent e2261e1 commit a5e2851
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libs/BveTypes/ClassWrappers/Public/MapObjectList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ private static void Initialize(BveTypeSet bveTypes)

CurrentIndexGetMethod = members.GetSourcePropertyGetterOf(nameof(CurrentIndex));
CurrentIndexSetMethod = members.GetSourcePropertySetterOf(nameof(CurrentIndex));

GoToMethod = members.GetSourceMethodOf(nameof(GoTo));
}

/// <summary>
Expand Down Expand Up @@ -58,5 +60,12 @@ public int CurrentIndex
get => (int)CurrentIndexGetMethod.Invoke(Src, null);
set => CurrentIndexSetMethod.Invoke(Src, new object[] { value });
}

private static FastMethod GoToMethod;
/// <summary>
/// 指定したインデックスへ移動します。
/// </summary>
/// <param name="index"></param>
public void GoTo(int index) => GoToMethod.Invoke(Src, new object[] { index });
}
}
2 changes: 2 additions & 0 deletions Libs/BveTypes/WrapTypes/5.8.7554.391.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@
<Getter Original="g"/>
<Setter Original="d"/>
</Property>

<Method Wrapper="GoTo" WrapperParams="System.Int32" Original="f"/>
</Class>

<Class Wrapper="MaterialInfo" Original="e0">
Expand Down
2 changes: 2 additions & 0 deletions Libs/BveTypes/WrapTypes/6.0.7554.619.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@
<Getter Original="g"/>
<Setter Original="d"/>
</Property>

<Method Wrapper="GoTo" WrapperParams="System.Int32" Original="f"/>
</Class>

<Class Wrapper="MaterialInfo" Original="e0">
Expand Down

0 comments on commit a5e2851

Please sign in to comment.