Advertisement
snake5

generated prefab script +

May 23rd, 2016
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Create_Player( level )
  2. {
  3.     obj = level.CreateGameObject().
  4.     {
  5.         name = "Player",
  6.         id = null,
  7.         localPosition = vec3(0,0,0),
  8.     };
  9.     rsrc = obj.AddResource( "test", 2 ).
  10.     {
  11.         "type" = 1,
  12.         "enabled" = true,
  13.         "hasShadows" = true,
  14.         "color" = vec3(0.372549, 0.564475, 1),
  15.         "intensity" = 5.476,
  16.         "range" = 3.204,
  17.         "power" = 1.332,
  18.         "localMatrix" = mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.846, 1),
  19.         "matrixMode" = 0,
  20.         "cookieTexture" = "",
  21.         "isStatic" = false,
  22.     };
  23.     bhvr = obj.AddBehavior( "chr", "TSCharacter" ).
  24.     {
  25.     };
  26.     bhvr = obj.AddBehavior( "ctrl_player", "TSPlayerController" ).
  27.     {
  28.     };
  29.     return obj;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement