Added Vec2 initialization

This commit is contained in:
sam-astro 2022-01-11 22:40:54 -05:00 committed by GitHub
parent aa312cbc3b
commit 74da7a7590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,11 @@ boost::any CPPFunction(const string& name, const vector<boost::any>& args)
cout << AnyAsString(args[0]);
else if (name == "CPP.System.PrintLine")
cout << AnyAsString(args[0]) << endl;
else if (name == "CPP.System.Vec2")
{
Vec2 v(AnyAsFloat(args[0]), AnyAsFloat(args[1]));
return v;
}
else
LogWarning("CPP function \'" + name + "\' does not exist.");