./cte_crack_binoc.lua

  1. Cte_crack_binoc_doc_handle = -1 
  2.  
  3. local Crack_grp_h = -1 
  4. local Crack_02_anim_h = -1 
  5. local Crack_black_h = -1 
  6. local Crack_white_h = -1 
  7.  
  8. function cte_crack_binoc_init() 
  9. 	 
  10. 	pause_map_dump() 
  11. 	 
  12. 	-- Delay loading new peg until pause map is fully dumped. 
  13. 	thread_new("cte_crack_binoc_peg_delay_load") 
  14. 	 
  15. 	Cte_crack_binoc_doc_handle = vint_document_find("cte_crack_binoc") 
  16. 	Crack_grp_h = vint_object_find("crack_grp", 0, Cte_crack_binoc_doc_handle) 
  17. 	Crack_black_h = vint_object_find("crack_black", 0, Cte_crack_binoc_doc_handle) 
  18. 	Crack_white_h = vint_object_find("crack_white", 0, Cte_crack_binoc_doc_handle) 
  19. 	 
  20. 	vint_set_property(Crack_grp_h, "visible", false) 
  21. 	 
  22. end 
  23.  
  24.  
  25. function cte_crack_binoc_peg_delay_load() 
  26. 	delay(2) 
  27. 	cte_crack_binoc_peg_load() 
  28. end 
  29.  
  30. function cte_crack_binoc_peg_load() 
  31. 	game_peg_load_with_cb("cte_crack_binoc_peg_load_complete",1,"ui_cte_crack") 
  32. end 
  33.  
  34. function cte_crack_binoc_peg_load_complete() 
  35. 	vint_set_property(Crack_black_h, "image", "ui_cte_crack") 
  36. 	vint_set_property(Crack_white_h, "image", "ui_cte_crack") 
  37. end 
  38.  
  39. function cte_crack_binoc_02out_16() 
  40. 	local crack_02_anim_h = vint_object_find("crack_02_anim", 0, Cte_crack_binoc_doc_handle) 
  41. 	vint_set_property(Crack_grp_h, "visible", true) 
  42. 	lua_play_anim(crack_02_anim_h) 
  43. end 
  44.  
  45. function cte_crack_binoc_05out_13() 
  46. 	local crack_05_anim_h = vint_object_find("crack_05_anim", 0, Cte_crack_binoc_doc_handle) 
  47. 	vint_set_property(Crack_grp_h, "visible", true) 
  48. 	lua_play_anim(crack_05_anim_h) 
  49. end 
  50.  
  51.  
  52. function cte_crack_binoc_cleanup() 
  53. 	game_peg_unload("ui_cte_crack") 
  54. 	pause_map_restore() 
  55. end 
  56.  
  57.