Selaa lähdekoodia

Merge pull request #1141 from rcmaniac25/helpful-additions-animation_property_id

Customizable Animation properties
Sean Paul Taylor 12 vuotta sitten
vanhempi
sitoutus
de0f05f491
2 muutettua tiedostoa jossa 11 lisäystä ja 11 poistoa
  1. 1 1
      gameplay/src/AnimationTarget.cpp
  2. 10 10
      gameplay/src/AnimationTarget.h

+ 1 - 1
gameplay/src/AnimationTarget.cpp

@@ -130,7 +130,7 @@ Animation* AnimationTarget::createAnimation(const char* id, Properties* animatio
     }
     }
 
 
     // Get animation target property id
     // Get animation target property id
-    int propertyId = AnimationTarget::getPropertyId(_targetType, propertyIdStr);
+	int propertyId = getPropertyId(_targetType, propertyIdStr);
     if (propertyId == -1)
     if (propertyId == -1)
     {
     {
         GP_ERROR("Property ID is invalid.");
         GP_ERROR("Property ID is invalid.");

+ 10 - 10
gameplay/src/AnimationTarget.h

@@ -166,6 +166,16 @@ protected:
      */
      */
     virtual ~AnimationTarget();
     virtual ~AnimationTarget();
 
 
+	/**
+     * Gets the TargetType's property ID value for the specified property ID string.
+     *
+     * @param type The TargetType of the AnimationTarget.
+     * @param propertyIdStr The property ID string.
+     * @return The property ID value for the property ID string; -1 if the propertyIdStr does not exist
+     *    for the TargetType.
+     */
+    virtual int getPropertyId(TargetType type, const char* propertyIdStr);
+
     /**
     /**
      * Adds the given animation channel to this animation target.
      * Adds the given animation channel to this animation target.
      *
      *
@@ -210,16 +220,6 @@ private:
      */
      */
     AnimationTarget(const AnimationTarget& copy);
     AnimationTarget(const AnimationTarget& copy);
 
 
-    /**
-     * Gets the TargetType's property ID value for the specified property ID string.
-     *
-     * @param type The TargetType of the AnimationTarget.
-     * @param propertyIdStr The property ID string.
-     * @return The property ID value for the property ID string; -1 if the propertyIdStr does not exist
-     *    for the TargetType.
-     */
-    static int getPropertyId(TargetType type, const char* propertyIdStr);
-
     /**
     /**
      * Converts by-value animations to to-value animations.
      * Converts by-value animations to to-value animations.
      */
      */