Inheritance: Affdex.ImageResultsListener
 void Awake()
 {
     if (spawnVectors.Length > 0)
     {
         for (int i = 0; i < spawnVectors.Length; i++)
         {
             if (spawnVectors[i].GetComponent<SpawnVectorScript>() == null)
             {
                 Debug.Log("SpawnVector GameObject No." + i + " does not have the required script Attached.");
                 errorHasOccured = true;
                 break;
             }
         }
         if (!errorHasOccured)
         {
             for (int i = 0; i < spawnVectors.Length - 1; i++)
             {
                 spawnVectors[i].Direction(spawnVectors[i + 1].transform.position);
             }
         }
         else
             Debug.Log("Fix the error before continuing playing the game.");
     }
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>();
     playerEmo = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PlayerEmotions>();
     spawn = spawnVectors[0].transform.position;
 }
Exemplo n.º 2
0
 void Awake()
 {
     player         = GameObject.FindGameObjectWithTag("Player").transform;
     playerHealth   = player.GetComponent <PlayerHealth> ();
     enemyHealth    = GetComponent <EnemyHealth> ();
     playerEmotions = player.GetComponent <PlayerEmotions> ();
     nav            = GetComponent <NavMeshAgent> ();
 }
Exemplo n.º 3
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag ("Player").transform;
     playerHealth = player.GetComponent <PlayerHealth> ();
     enemyHealth = GetComponent <EnemyHealth> ();
     playerEmotions = player.GetComponent<PlayerEmotions> ();
     nav = GetComponent <NavMeshAgent> ();
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     targetEmotion = Emotions.Joy; //Standard Joy, remove this
     emotions      = GetComponent <PlayerEmotions>();
     img.sprite    = neutral;
     TotalScore    = 0;
     graph         = GetComponent <ScoreGraph>();
 }
Exemplo n.º 5
0
    private void Awake()
    {
        _playerInput       = GetComponent <PlayerInput>();
        _characterMovement = GetComponent <CharacterMovement>();
        _playerEmotions    = GetComponent <PlayerEmotions>();

        CurrentInputs = new Inputs();

        BindActions();
    }
Exemplo n.º 6
0
 private bool zenState(PlayerEmotions playerEmotions)
 {
     if (playerEmotions == null)
         return false;
     else if (playerEmotions.currentValence > 80)
         return true;
     // Make it easy on QA to enter zen state!
     else if (Debug.isDebugBuild && playerEmotions.currentValence > 40)
         return true;
     else return false;
 }
Exemplo n.º 7
0
 void Start()
 {
     path = @"C:\" + name + ".txt";
     if (File.Exists(path))
     {
         for (int i = 0; i < 100; i++)
         {
             path = @"C:\" + name + i + ".txt";
             if (!File.Exists(path))
                 break;
         }
     }
     textOut = new StreamWriter(path, false);
     playEmo = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PlayerEmotions>();
 }
Exemplo n.º 8
0
 private bool zenState(PlayerEmotions playerEmotions)
 {
     if (playerEmotions == null)
     {
         return(false);
     }
     else if (playerEmotions.currentValence > 80)
     {
         return(true);
     }
     // Make it easy on QA to enter zen state!
     else if (Debug.isDebugBuild && playerEmotions.currentValence > 40)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     if (inGame)
     {
         targetEmotion = Emotions.None;             //Standard Joy, remove this
         emotions      = GetComponent <PlayerEmotions> ();
         TotalScore    = 0;
         Score         = 0;
         canMove       = true;
         SaveScore();
         SetTarget(Emotions.None);
     }
     else
     {
         Score = PlayerPrefs.GetFloat("score");
         if (CheckHighscore())
         {
             nameText.Select();
             nameText.ActivateInputField();
         }
     }
 }
Exemplo n.º 10
0
    private void Awake()
    {
        category = PlayerPrefs.GetString("category");
        level    = PlayerPrefs.GetInt("level");
        puzzles  = Resources.LoadAll <Sprite>(pathToEasyCards + category);

        Transform player = GameObject.FindGameObjectWithTag("Player").transform;

        playerEmotions = player.GetComponent <PlayerEmotions>();

        Transform emotion = GameObject.FindGameObjectWithTag("CurrentEmotion").transform;

        emotionField       = emotion.GetComponent <Text>();
        emotionAccumulator = new EmotionAccumulator();

        Transform timer = GameObject.FindGameObjectWithTag("Timer").transform;

        timeField = timer.GetComponent <Text>();

        Transform faceDetectionField = GameObject.FindGameObjectWithTag("FaceDetectionField").transform;

        faceField = faceDetectionField.GetComponent <Text>();
    }
Exemplo n.º 11
0
 void Awake()
 {
     player         = GameObject.FindGameObjectWithTag("Player").transform;
     playerEmotions = player.GetComponent <PlayerEmotions> ();
 }
Exemplo n.º 12
0
 void Start()
 {
     light          = GetComponent <Light>();
     player         = GameObject.FindGameObjectWithTag("Player").transform;
     playerEmotions = player.GetComponent <PlayerEmotions>();
 }
Exemplo n.º 13
0
 void Start ()
 {
     light = GetComponent<Light>();
     player = GameObject.FindGameObjectWithTag("Player").transform;
     playerEmotions = player.GetComponent<PlayerEmotions>();
 }
Exemplo n.º 14
0
 void Awake ()
 {
     player = GameObject.FindGameObjectWithTag ("Player").transform;
     playerEmotions = player.GetComponent<PlayerEmotions> ();
 }
Exemplo n.º 15
0
 private void Awake()
 {
     _controller    = GetComponent <CharacterController>();
     playerEmotions = GetComponent <PlayerEmotions>();
     stamina        = StartStamina;
 }