add some enemy behavior prototypes

This commit is contained in:
2022-07-21 00:05:08 -04:00
parent 31003a2863
commit 948f4ce911
20 changed files with 268 additions and 34 deletions

View File

@@ -31,6 +31,11 @@ namespace godot
*
*/
const float jump_force = 300.0;
/**
* @brief The default bounce force applied when bouncing on something.
*
*/
const float bounce_force = 200.0;
/**
* @brief The default gravity applied to the player.
*
@@ -93,6 +98,11 @@ namespace godot
*
*/
float jump_force;
/**
* @brief The force applied to the player when bouncing off something.
*
*/
float bounce_force;
/**
* @brief The gravity applied to the player.
*
@@ -194,6 +204,20 @@ namespace godot
*/
float get_jump_force();
/**
* @brief Set the bounce force object.
*
* @param[in] bounce_force The new force applied to the player to make him bounce.
*/
void set_bounce_force(float bounce_force);
/**
* @brief Get the bounce force object.
*
* @return float The current force being applied to the player.
*/
float get_bounce_force();
/**
* @brief Set the gravity object.
*
@@ -250,6 +274,8 @@ namespace godot
* @return Vector2 Returns the velocity of the player.
*/
Vector2 get_velocity();
void _on_player_touched();
};
}
}