Пример #1
0
    // Override OnInsepctorGUI() to draw your own editor
    public override void OnInspectorGUI()
    {
        m_Target = (InteractiveFacialAnimation)target;

        DrawDefaultInspector(); // Draws all the stuff Unity would normally draw
        DrawEmotionList();
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        //Adds a listener that invokes the "LockInput" method when the player finishes editing the main input field.
        //Passes the main input field into the method when "LockInput" is invoked
        mainInputField.onEndEdit.AddListener(delegate { LockInput(mainInputField); });
        mainInputField2.onEndEdit.AddListener(delegate { LockInput(mainInputField2); });
        mainInputField3.onEndEdit.AddListener(delegate { LockInput(mainInputField3); });

        mainInputField.text  = "StaticHappy";
        mainInputField2.text = "StaticAngry";
        mainInputField3.text = "StaticSadness";

        playables1 = claire1.GetComponent <InteractiveFacialAnimation>();
        playables2 = claire2.GetComponent <InteractiveFacialAnimation>();
        playables3 = claire3.GetComponent <InteractiveFacialAnimation>();

        playables1.playEmotion("StaticNeutral");
        playables2.playEmotion("StaticNeutral");
        playables3.playEmotion("StaticNeutral");
    }