Files
o3de/AutomatedTesting/Gem/PythonTests/Blast/ActorSplitsAfterTriangleDamage.py
T
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00

34 lines
1.4 KiB
Python
Executable File

"""
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from ActorSplitsAfterDamage import Tests
def ActorSplitsAfterTriangleDamage():
from ActorSplitsAfterDamage import base_run as internal_run
from BlastUtils import Constants
def TriangleDamage(target_id, position):
# Some points that form a triangle that contains the given position
position0 = azlmbr.object.construct('Vector3', position.x, position.y + 1.0, position.z)
position1 = azlmbr.object.construct('Vector3', position.x + 1.0, position.y - 1.0, position.z)
position2 = azlmbr.object.construct('Vector3', position.x - 1.0, position.y - 1.0, position.z)
azlmbr.destruction.BlastFamilyDamageRequestBus(azlmbr.bus.Event, "Triangle Damage", target_id,
position0, position1, position2,
Constants.DAMAGE_AMOUNT)
internal_run(TriangleDamage)
if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from editor_python_test_tools.utils import Report
Report.start_test(ActorSplitsAfterTriangleDamage)