Warning: Declaration of action_plugin_linebreak::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/linebreak/action.php on line 41

Warning: Declaration of action_plugin_markdownextra::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/markdownextra/action.php on line 16

Warning: Declaration of action_plugin_syntaxhighlighter3_action::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/syntaxhighlighter3/action/action.php on line 28
wiki:ue4:tips:500 [stepism@UE4メモ]

ユーザ用ツール

サイト用ツール


wiki:ue4:tips:500

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
wiki:ue4:tips:500 [2015/03/28 05:22]
step
wiki:ue4:tips:500 [2016/03/06 10:32] (現在)
step
ライン 1: ライン 1:
-====== C++/​Actorクラスの作成 ====== +投稿は再構築して移動しま。 
- +[[wiki:tips:​006|http://stepism.sakura.ne.jp/ue4/wiki/doku.php?id=wiki:tips:006]]
-  - 「コンテンツブラウザ」の「新規追加」から「新規C++ Class...」を選択。 +
-  - 親クラスに「Actor」を選択して次へ。 +
-  - 名前を「MyActor」とて「クラスを作成」する。 +
- +
-===== コードの記述とコンパイル ===== +
-  - 自動でVisualStudioが開くので、MyActor.h/​cppを編集する。 +
-<code csharp>​ +
-// MyActor.h +
-class STDPROJECT_API AMyActor ​public AActor +
-+
-    GENERATED_BODY() +
-private: +
-    ​// 追加 +
-    float m_fRunningTime;​ +
-+
-</code> +
- +
- +
-<code csharp>​ +
-// MyActor.cpp +
- +
-// 生成された時に一度だけ呼ばれる。 +
-void AMyActor::​BeginPlay() +
-+
-    Super::​BeginPlay();​ +
-     +
-+
- +
-// 毎フレーム呼ばれる。 +
-void AMyActor::​Tick( float DeltaTime ) +
-+
-    Super::​Tick( DeltaTime ); +
- +
-    // 追加 +
-    FVector NewLocation ​GetActorLocation();​ +
-    float DeltaHeight = (FMath::Sin(m_fRunningTime + DeltaTime) - FMath::​Sin(m_fRunningTime));​ +
-    NewLocation.Z += DeltaHeight * 20.0f; +
-    m_fRunningTime += DeltaTime;​ +
-    SetActorLocation(NewLocation);​ +
-+
-</​code>​ +
- +
-動作は公式のクイックスタートのコードそのままです。プロジェクトをビルドしてエラーが出ないことを確認します。 +
wiki/ue4/tips/500.1427520176.txt.gz · 最終更新: 2015/03/28 05:22 by step