public Entity(int width, int height, int originx, int originy, int elevation, float rotation, bool isVisible, Texture2D sprite) { //create the struct to hold the variables for the entity vars = new EntityVariables { DrawingVector = new Vector2(originx, originy), CollisionRectangle = new Rectangle(originx - (width / 2), originy - (height / 2), width, height), CollisonCircle = new Circle(originx, originy, width / 2), elevation = elevation, isVisible = isVisible, sprite = sprite, rotation = rotation }; }
// Use this for initialization void Start() { currentExperiencePoints = Mathf.Clamp(currentExperiencePoints, 0, MAXIMUM_EXP); variables = GetComponent <EntityVariables>(); }
void Start() { entityVariables = GetComponent <EntityVariables>(); }
void Awake() { script = GetComponent <EntityVariables>(); }