Lua向C#逻辑迁移 一期
创建了若干C#文件,替代对应lua文件
This commit is contained in:
		| @ -0,0 +1,32 @@ | ||||
| using UnrealSharp.Attributes; | ||||
| using UnrealSharp.Engine; | ||||
|  | ||||
| namespace Level.GameSettings; | ||||
|  | ||||
| [UClass] | ||||
| public class ABusyLevelGameMode : AGameMode | ||||
| { | ||||
|     [UProperty(PropertyFlags.EditDefaultsOnly)] | ||||
|     public UnrealSharp.TSubclassOf<AActor> GameMapActorClass { get; set; } | ||||
|  | ||||
|     protected override void BeginPlay() | ||||
|     { | ||||
|         base.BeginPlay(); | ||||
|         if (GameMapActorClass.Valid) | ||||
|         { | ||||
|             SpawnActor(GameMapActorClass); | ||||
|         } | ||||
|     } | ||||
|      | ||||
| } | ||||
|  | ||||
| // -- function LevelGameMode:K2_PostLogin(new_player_controller) | ||||
| // --     local new_player_state = new_player_controller.PlayerState | ||||
| // --     local role = new_player_state:CreateRoleRoster(new_player_controller) | ||||
| // --     local new_pos = FVector() | ||||
| // --     new_pos.X = 500 | ||||
| // --     new_pos.Y = 500 | ||||
| // --     new_pos.Z = 50 | ||||
| // --     role:K2_SetActorLocation(new_pos, true, nil, false) | ||||
| // --     new_player_controller:Possess(role) | ||||
| // -- end | ||||
		Reference in New Issue
	
	Block a user