Esempio n. 1
0
        private void Start()
        {
            Observer.Button("Button Examples", "Function Call Button", TestFunction);

            Observer.Button("Button Examples", "Anonymous Call Button", () =>
            {
                Debug.Log("Anonymous Function Called");
            });

            Observer.Value("Update Examples", "Boolean Type", m_BoolTest, (object val) =>
            {
                m_BoolTest = (bool)val;
            });

            Observer.Value("Update Examples", "String Type", m_StringTest, (object val) =>
            {
                m_StringTest = (string)val;
            });

            Observer.Value("Update Examples", "Integer Type", m_IntTest, (object val) =>
            {
                m_IntTest = (int)val;
            });

            Observer.Value("Update Examples", "Float Type", m_FloatTest, (object val) =>
            {
                m_FloatTest = (float)val;
            });

            Observer.Value("Update Examples", "Double Type", m_DoubleTest, (object val) =>
            {
                m_DoubleTest = (double)val;
            });

            // Observer.Seperator("Update Examples");

            Observer.Value("Update Examples", "Vector2 Type", m_Vec2Test, (object val) =>
            {
                m_Vec2Test = (Vector2)val;
            });

            Observer.Value("Update Examples", "Vector3 Type", m_Vec3Test, (object val) =>
            {
                m_Vec3Test = (Vector3)val;
            });

            Observer.Value("Update Examples", "Color Type", m_ColorTest, (object val) =>
            {
                m_ColorTest = (Color)val;
            });

            Observer.Value("Update Examples", "Enum Type", m_EnumTest, (object val) =>
            {
                m_EnumTest = (ObserverEntryType)val;
            });

            // Observer.Header("Update Examples", "Header Example");

            Observer.Value("Update Examples", "Vector4 Type", m_UnsupportedTest, (object val) =>
            {
                m_UnsupportedTest = (Vector4)val;
            });
        }