Пример #1
0
 // Use this for initialization
 void Start()
 {
     image     = GetComponent <Image> ();
     bgt       = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;
     originalP = transform.position;
     pageSet   = false;
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     bgt         = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;
     soundPlayed = false;
     audio       = GetComponent <AudioSource> ();
     audio.clip  = sounds;
     counter     = 0;
 }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        bgt = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;

        if (hasSound)
        {
            soundPlayed = false;

            GetComponent <AudioSource> ().clip = sounds;
        }
    }
Пример #4
0
 /**
  * Use this for initialization
  * Figures out if we can skip the story
  */
 void Start()
 {
     bgt = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;
     // figure out if we can skip by looking at which stories we have already played through at least once
     if (Application.loadedLevelName.Equals("IntroStoryboard"))
     {
         canSkip = ((PlayerPrefs.GetInt("PlayedIntroStory") == 1) ? true : false);
     }
     else if (Application.loadedLevelName.Equals("MouthStoryboard"))
     {
         canSkip = ((PlayerPrefs.GetInt("PlayedMouthStory") == 1) ? true : false);
     }
     else if (Application.loadedLevelName.Equals("MouthEndStoryboard"))
     {
         canSkip = ((PlayerPrefs.GetInt("PlayedMouthEndStory") == 1) ? true : false);
     }
     else if (Application.loadedLevelName.Equals("SmallIntestineStoryboard"))
     {
         canSkip = (PlayerPrefs.GetInt("PlayedSIStory") == 1) ? true : false;
     }
 }
Пример #5
0
    // Use this for initialization
    void Start()
    {
        image   = GetComponent <Image> ();
        charBox = GetComponent <BoxCollider2D> ();
        bgt     = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;


        charTracker  = 0;
        currentAnim  = 0;
        currentFlame = 0;
        animPlaying  = false;
        turnPage     = false;

        /*
         * if (bgt.CharacterPage.Length != 0) {
         *      CharacterImages = bgt.CharacterImage;
         * }
         */


        if (pageNum <= bgt.totalPages())                                                        //if we can find the page, add images;


        {
        }
        else
        {
        }


        if (animated)
        {
            flamePerAnim = CharacterImages.Length / animNums;
        }

        if (hasSound)
        {
            soundPlayed = false;
        }
    }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     image   = GetComponent <Image> ();
     charBox = GetComponent <BoxCollider2D> ();
     bgt     = FindObjectOfType(typeof(BackGroundTurner)) as BackGroundTurner;
 }