public static void SendImpression(GameObject target, string impression, int val)
 {
     //Debug.Log("FollowAction.SendImpression " + impression + " to " + targetCharacter.name);
     ImpressionPush impressionPush = new ImpressionPush(impression, new NumericConstant(val), false, null);
     Perception perception = new ImpressionPerception(CharacterManager.GetPC(), impressionPush);
     PerceptionListener perceptionListener = target.GetComponent(typeof(PerceptionListener)) as PerceptionListener;
     perceptionListener.Perceive(perception);
 }
    public void SendPerception(bool isWinner, int winnings)
    {
        int impressionPushValue = Mathf.Max(1, (int)(winnings * IMPRESSION_PUSH_PER_DOLLAR_WON));

        if (!isWinner){
            impressionPushValue = - impressionPushValue;
        }

        ImpressionPush impressionPush = new ImpressionPush("GoodAtPoker", new NumericConstant(impressionPushValue), false, null);
        Perception perception = new ImpressionPerception(actor, impressionPush);
        PerceptionManager.BroadcastPerception(perception);
    }
    /*
     * Does things needed for terminateing dance mode
     *
     */
    private void TerminateDanceMode(bool playerTerminated)
    {
        float corlen=Time.time - debugDanceStartedTime;
        //Debug.Log("-- Song lenght:" + corlen);
        //Debug.Log("-- Score: " + score);

        // score : 0 ... 100

        if(playerTerminated & score > 60) {
            score = score - 10;
        }

        impressionPushValue = (int)score / 10 - 5;
        if(impressionPushValue<-1) {
                impressionPushValue = -1;
        }
        Debug.Log("DanceModeController.TerminateDanceMode(): impressionPushValue=" + impressionPushValue);

        ImpressionPush impressionPush = new ImpressionPush("Exquisite", new NumericConstant(impressionPushValue), false, null);
        Perception perception = new ImpressionPerception(pc, impressionPush);
        witnesses = PerceptionManager.BroadcastPerceptionAndReturnWhoSaw(perception);
        Debug.Log("DanceModeController.DrawGUI(): state==STATES.SHOW_SCORE, hits=" + instance.correntHits + ", error=" + instance.errors + ", witnesses=" + instance.witnesses.Count);
        FModManager.RemoveMusicSyncListener(this);
        FModManager.Cue(FModLies.MUSICCUE_LIES_NIGHTCLUB_MUZAK);
        GameTime.SetGUIVisible(true);
        TaskHelp.Reveal();
        state = STATES.SHOW_SCORE;
        dialogEnabledTime = Time.time;

        pcDanceAction.StopDancing();

        CameraController.SetDefaultCameraAngle();
    }