CSEngine
Loading...
Searching...
No Matches
SScriptObject.h
1//
2// Created by ounols on 19. 10. 27.
3//
4
5#pragma once
6
7#include "SResource.h"
8#include <vector>
9
10namespace CSE {
11
12 class SScriptObject : public SResource {
13 public:
14 RESOURCE_DEFINE_CONSTRUCTOR(SScriptObject);
15 ~SScriptObject() override;
16
17 void Exterminate() override;
18
19 std::vector<std::string> GetVariables() const;
20
21 std::string GetScriptClassName() const {
22 return m_className;
23 }
24
25 void SetValue(std::string name_str, Arguments value) override;
26
27 std::string PrintValue() const override;
28
29 protected:
30 void Init(const AssetMgr::AssetReference* asset) override;
31
32 private:
33 void RegisterScript(const std::string& script);
34 void RemakeScript(const std::string& path);
35 void GetVariables(const std::string& str);
36
37 private:
38 std::vector<std::string> m_variables;
39 std::string m_className;
40 };
41
42}
void SetValue(std::string name_str, Arguments value) override