mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 18:38:10 +00:00
Make ControlBehavior messages far more modular (#991)
* Make case consistent * How modular can you go? Holy modular * Add comments * Initialize values
This commit is contained in:
@@ -1,32 +1,31 @@
|
||||
#ifndef __ADDSTRIPMESSAGE__H__
|
||||
#define __ADDSTRIPMESSAGE__H__
|
||||
|
||||
#include "ActionContext.h"
|
||||
#include "BehaviorMessageBase.h"
|
||||
#include "StripUiPosition.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class Action;
|
||||
class AMFArrayValue;
|
||||
|
||||
/**
|
||||
* @brief Sent in 2 contexts:
|
||||
* A player adds an Action A from their toolbox without attaching it to an existing Strip. In this case, only 1 action is sent.
|
||||
* A player moves a Strip from BehaviorState A directly to BehaviorState B. In this case, a list of actions are sent.
|
||||
*
|
||||
*/
|
||||
class AddStripMessage : public BehaviorMessageBase {
|
||||
public:
|
||||
AddStripMessage(AMFArrayValue* arguments);
|
||||
const StripId GetStripId() { return stripId; };
|
||||
const BehaviorState GetStateId() { return stateId; };
|
||||
const std::string& GetType() { return type; };
|
||||
const std::string& GetValueParameterName() { return valueParameterName; };
|
||||
const std::string& GetValueParameterString() { return valueParameterString; };
|
||||
const double GetXPosition() { return xPosition; };
|
||||
const double GetYPosition() { return yPosition; };
|
||||
const double GetValueParameterDouble() { return valueParameterDouble; };
|
||||
const uint32_t GetBehaviorId() { return behaviorId; };
|
||||
StripUiPosition GetPosition() { return position; };
|
||||
ActionContext GetActionContext() { return actionContext; };
|
||||
std::vector<Action> GetActionsToAdd() { return actionsToAdd; };
|
||||
private:
|
||||
double xPosition;
|
||||
double yPosition;
|
||||
StripId stripId;
|
||||
BehaviorState stateId;
|
||||
uint32_t behaviorId;
|
||||
std::string type;
|
||||
std::string valueParameterName;
|
||||
std::string valueParameterString;
|
||||
double valueParameterDouble;
|
||||
StripUiPosition position;
|
||||
ActionContext actionContext;
|
||||
std::vector<Action> actionsToAdd;
|
||||
};
|
||||
|
||||
#endif //!__ADDSTRIPMESSAGE__H__
|
||||
|
Reference in New Issue
Block a user