Ejemplo n.º 1
0
    //HappyDetector blabla;


    void Awake()
    {
        player       = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent <PlayerHealth> ();
        enemyHealth  = GetComponent <EnemyHealth>();
        anim         = GetComponent <Animator> ();
        //blabla = GameObject.FindGameObjectWithTag ("HappyDetector");
        faceController = GameObject.Find("FaceController");
        face           = faceController.GetComponent <fs.FaceshiftLive> ();
    }
Ejemplo n.º 2
0
    void Start()
    {
        faceController = GameObject.Find("FaceController");
        face           = faceController.GetComponent <fs.FaceshiftLive> ();

        // Make the rigid body not change rotation
        if (GetComponent <Rigidbody>())
        {
            GetComponent <Rigidbody>().freezeRotation = true;
        }
    }
Ejemplo n.º 3
0
    void Awake()
    {
        player       = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent <PlayerHealth> ();
        anim         = GetComponent <Animator> ();

        enemyAudio      = GetComponent <AudioSource> ();
        hitParticles    = GetComponentInChildren <ParticleSystem> ();
        capsuleCollider = GetComponent <CapsuleCollider> ();

        currentHealth = startingHealth;

        faceController = GameObject.Find("FaceController");
        face           = faceController.GetComponent <fs.FaceshiftLive> ();
    }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        faceController = GameObject.Find("FaceController");
        face           = faceController.GetComponent <fs.FaceshiftLive> ();

        // Populate the color keys at the relative time 0 and 1 (0 and 100%)
        GradientColorKey[] gck = new GradientColorKey[2];
        gck [0] = new GradientColorKey(sadColor, 0.0f);
        gck [1] = new GradientColorKey(happyColor, 0.8f);

        // Populate the alpha  keys at relative time 0 and 1  (0 and 100%)
        GradientAlphaKey[] gak = new GradientAlphaKey[2];
        gak [0] = new GradientAlphaKey(sadIntensity, 0.0f);
        gak [1] = new GradientAlphaKey(happyIntensity, 0.8f);

        g.SetKeys(gck, gak);

        lightRef = GetComponent <Light> ();
    }
Ejemplo n.º 5
0
 void Awake()
 {
     anim           = GetComponent <Animator> ();
     faceController = GameObject.Find("FaceController");
     face           = faceController.GetComponent <fs.FaceshiftLive> ();
 }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     faceController = GameObject.Find("FaceController");
     face           = faceController.GetComponent <fs.FaceshiftLive> ();
 }