Minor template code patch. (objectHitList =/= hitObjectList)

The Blender text editor's built in python template "Gamelogic" has a reference near the bottom to "objectHitList" as an alleged attribute to the KX_TouchSensor. This name is incorrect, it's correct name is "hitObjectList."

Attempting to access the suggested objectHitList returns error...
```
AttributeError: 'KX_TouchSensor' object has no attribute 'objectHitList'
```

The provided diff corrects this minor error.

Reviewers: kupoman, moguri, campbellbarton, Blendify

Reviewed By: Blendify

Tags: #game_engine, #game_python

Differential Revision: https://developer.blender.org/D2748
This commit is contained in:
Aaron Carlisle 2017-07-26 15:56:43 -04:00
parent 66e28a2827
commit 320fc70cf2

@ -62,7 +62,7 @@ def main():
# adding to our objects "life" property # adding to our objects "life" property
""" """
actu_collide = cont.sensors["collision_sens"] actu_collide = cont.sensors["collision_sens"]
for ob in actu_collide.objectHitList: for ob in actu_collide.hitObjectList:
# Check to see the object has this property # Check to see the object has this property
if "life" in ob: if "life" in ob:
own["life"] += ob["life"] own["life"] += ob["life"]