2
0

CActorWrapper.lua 883 B

123456789101112131415161718192021222324252627282930
  1. ----------------------------------------------------------------------------------------------------
  2. --
  3. -- Copyright (c) Contributors to the Open 3D Engine Project.
  4. -- For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. --
  6. -- SPDX-License-Identifier: Apache-2.0 OR MIT
  7. --
  8. --
  9. --
  10. ----------------------------------------------------------------------------------------------------
  11. -- Just here so the entity system won't spam
  12. CActorWrapper =
  13. {
  14. Editor={
  15. Icon="SpawnPoint.bmp",
  16. },
  17. Properties =
  18. {
  19. Prototype = ""
  20. },
  21. }
  22. function CActorWrapper:OnSpawn()
  23. CryAction.CreateGameObjectForEntity(self.id);
  24. CryAction.ActivateExtensionForGameObject(self.id, "CActorWrapper", true);
  25. end
  26. function CActorWrapper:OnDestroy()
  27. CryAction.ActivateExtensionForGameObject(self.id, "CActorWrapper", false);
  28. end