playerCtrl.engine_EmoStateUpdated C# (CSharp) 메소드

engine_EmoStateUpdated() 공개 메소드

public engine_EmoStateUpdated ( object sender, EmoStateUpdatedEventArgs, e ) : void
sender object
e EmoStateUpdatedEventArgs,
리턴 void
    void engine_EmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
    {
        EmoState es = e.emoState;
        if (e.userId != 0)
            return;
        Debug.Log ("Corrent action: " + es.MentalCommandGetCurrentAction().ToString());
        if (es.MentalCommandGetCurrentAction () == EdkDll.IEE_MentalCommandAction_t.MC_PUSH) {
            Vector3 movement = new Vector3(cam.transform.forward.x, cam.transform.forward.y, cam.transform.forward.z);
            rb.AddForce(movement * speed);
            Debug.Log ("Push");
        }
    }