Пример #1
0
    void Awake()
    {
        QualitySettings.vSyncCount = 1;

        if (!mInstance)
            mInstance = this;
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this.gameObject);

        clothesSettings = GetComponent<ClothesSettings>();
        enemiesManager = GetComponent<EnemiesManager>();
        gameData = GetComponent<GameData>();
        gameSettings = GetComponent<GameSettings>();
        areasManager = GetComponent<AreasManager>();
        musicManager = GetComponent<MusicManager>();
        soundManager = GetComponent<SoundManager>();
        combosManager = GetComponent<CombosManager>();
        specialItems = GetComponent<SpecialItemsManager>();
        moodsManager = GetComponent<MoodsManager>();
        texts = GetComponent<Texts>();

        GetComponent<MusicManager>().Init();
        GetComponent<SoundManager>().Init();
        moodsManager.Init();

        //#if UNITY_ANDROID || UNITY_IPHONE
           // Handheld.PlayFullScreenMovie(movPath, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.AspectFill);
        //#endif
    }
Пример #2
0
    void Start()
    {
        if(TouchScreenKeyboard.isSupported)
            TouchScreenKeyboard.Open("");

        clothesSettings = Data.Instance.clothesSettings;
        savedSettings = Data.Instance.savedSettings;
        characterManager.SetCloth(clothesSettings.faces, savedSettings.myPlayerSettings.face);
        characterManager.SetCloth(clothesSettings.hairs, savedSettings.myPlayerSettings.hair);
        characterManager.SetCloth(clothesSettings.legs, savedSettings.myPlayerSettings.bottom);
        characterManager.SetCloth(clothesSettings.shoes, savedSettings.myPlayerSettings.shoes);
        characterManager.SetCloth(clothesSettings.tops, savedSettings.myPlayerSettings.body);
        characterManager.SetCloth(clothesSettings.glasses, savedSettings.myPlayerSettings.glasses);
        characterManager.SetColor(savedSettings.myPlayerSettings.color);
    }
Пример #3
0
    void Start()
    {
        Events.OnCustomizerSave += OnCustomizerSave;

        clothSettings = Data.Instance.clothesSettings;
        myPlayerSettings = new PlayerSettings();

        int sex = PlayerPrefs.GetInt("sex", 0);
        if (sex == 0)
            myPlayerSettings.sex = PlayerSettings.sexType.VARON;
        else myPlayerSettings.sex = PlayerSettings.sexType.MUJER;

        myPlayerSettings.clothes = PlayerPrefs.GetInt("clothes", 0);
        myPlayerSettings.legs = PlayerPrefs.GetInt("legs", 0);
        myPlayerSettings.shoes = PlayerPrefs.GetInt("shoes", 0);
        myPlayerSettings.skin = PlayerPrefs.GetInt("skin", 0);
        myPlayerSettings.hairs = PlayerPrefs.GetInt("hairs", 0);
    }
Пример #4
0
    void Start()
    {
        Events.OnCustomizerButtonPrevClicked += OnCustomizerButtonPrevClicked;
        Events.OnCustomizerButtonNextClicked += OnCustomizerButtonNextClicked;

        clothesSettings = Data.Instance.clothesSettings;
        savedSettings = Data.Instance.savedSettings;

        savedSettings.CreateRandomPlayer();

        characterManager.SetCloth(clothesSettings.faces, savedSettings.myPlayerSettings.face);
        characterManager.SetCloth(clothesSettings.hairs, savedSettings.myPlayerSettings.hair);
        characterManager.SetCloth(clothesSettings.legs, savedSettings.myPlayerSettings.bottom);
        characterManager.SetCloth(clothesSettings.shoes, savedSettings.myPlayerSettings.shoes);
        characterManager.SetCloth(clothesSettings.tops, savedSettings.myPlayerSettings.body);
        characterManager.SetCloth(clothesSettings.glasses, savedSettings.myPlayerSettings.glasses);
        characterManager.SetColor(savedSettings.myPlayerSettings.color);
    }
Пример #5
0
    void Awake()
    {
        if (!mInstance)
            mInstance = this;
        //otherwise, if we do, kill this thing
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this);
        missionsManager = GetComponent<MissionsManager>();
        texts = GetComponent<Texts>();
        settings = GetComponent<Settings>();
        userData = GetComponent<UserData>();
        clothesSettings = GetComponent<ClothesSettings>();
        savedSettings = GetComponent<SavedSettings>();
    }
Пример #6
0
    void Awake()
    {
        fade = GetComponentInChildren<Fade>();

        fade.gameObject.SetActive(true);
        if (!mInstance)
            mInstance = this;
        //otherwise, if we do, kill this thing
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this.gameObject);

        settings = GetComponent<Settings>();
        savedSettings = GetComponent<SavedSettings>();
        clothesSettings = GetComponent<ClothesSettings>();
    }
Пример #7
0
 void Start()
 {
     pathPreFix = @"file://";
     clothSettings = Data.Instance.clothesSettings;
     savedSettings = Data.Instance.savedSettings;
       //  GetComponent<Animation>().Play("shoes1");
     if (UnityEngine.Random.Range(0, 100) < 50)
         RandomActionAnim();
     else
         RandomIdleAnim();
 }
Пример #8
0
    public void SetCloth(List<string> arr, int idNum)
    {
        pathPreFix = @"file://";
        clothSettings = Data.Instance.clothesSettings;
        savedSettings = Data.Instance.savedSettings;

        if (arr == clothSettings.glasses)
        {
            pathTemp = pathPreFix + clothSettings.glasses[idNum] + ".png";
            StartCoroutine("LoadImages", glassesContainer[0]);
        }
        if (arr == clothSettings.shoes)
        {
            pathTemp = pathPreFix + clothSettings.shoes[idNum] + ".png";
            StartCoroutine("LoadImages", shoesContainer[0]);
            StartCoroutine("LoadImages", shoesContainer[1]);
        }
        else if (arr == clothSettings.faces)
        {
            pathTemp = pathPreFix + clothSettings.faces[idNum] + ".png";
            StartCoroutine("LoadImages", HeadContainer[0]);
        }
        else if (arr == clothSettings.tops)
        {
            pathTemp = pathPreFix + clothSettings.tops[idNum] + "_a.png";
            StartCoroutine("LoadImages", BodyContainer[0]);

            pathTemp = pathPreFix + clothSettings.tops[idNum] + "_b.png";
            StartCoroutine("LoadImages", Arm1Container[0]);
            StartCoroutine("LoadImages", Arm1Container[1]);

            pathTemp = pathPreFix + clothSettings.tops[idNum] + "_c.png";
            StartCoroutine("LoadImages", Arm2Container[0]);
            StartCoroutine("LoadImages", Arm2Container[1]);

            pathTemp = pathPreFix + clothSettings.tops[idNum] + "_d.png";
            StartCoroutine("LoadImages", Arm3Container[0]);
            StartCoroutine("LoadImages", Arm3Container[1]);
        }
        else if (arr == clothSettings.legs)
        {
            pathTemp = pathPreFix + clothSettings.legs[idNum] + "_a.png";
            StartCoroutine("LoadImages", HipContainer[0]);

            pathTemp = pathPreFix + clothSettings.legs[idNum] + "_b.png";
            StartCoroutine("LoadImages", LegsContainer[0]);
            StartCoroutine("LoadImages", LegsContainer[1]);
        }
        else if (arr == clothSettings.hairs)
        {
            pathTemp = pathPreFix + clothSettings.hairs[idNum] + "_a.png";
            StartCoroutine("LoadImages", Hair1Container[0]);

            pathTemp = pathPreFix + clothSettings.hairs[idNum] + "_b.png";
            StartCoroutine("LoadImages", Hair2Container[0]);
        }
    }
Пример #9
0
    void Start()
    {
        Events.OnCustomizerButtonPrevClicked += OnCustomizerButtonPrevClicked;
        Events.OnCustomizerButtonNextClicked += OnCustomizerButtonNextClicked;

        clothesSettings = Data.Instance.clothesSettings;
        savedSettings = Data.Instance.savedSettings;

        Invoke("Delay", 0.5f);

        SetSexButton();

        usernameField.text = Data.Instance.userData.username;
    }
Пример #10
0
 void Start()
 {
     settings = Data.Instance.settings;
     clothesSettings = Data.Instance.clothesSettings;
     savedSettings = Data.Instance.savedSettings;
     vueltas = 0;
     StartCoroutine("NextSlide");
 }
Пример #11
0
 void Start()
 {
     clothSettings = Data.Instance.clothesSettings;
     string randomSex = sex[UnityEngine.Random.Range(0, sex.Length)];
     string randomstyle = styles[UnityEngine.Random.Range(0, styles.Length)];
     Dress("A", randomSex, randomstyle);
 }
Пример #12
0
 void Start()
 {
     clothSettings = Data.Instance.clothesSettings;
     LoadSavedPlayers();
     myPlayerSettings = new PlayerSettings();
     int disciplinaID = GetComponent<Settings>().disciplinaId;
 }
Пример #13
0
 void Start()
 {
     clothesSettings = Data.Instance.clothesSettings;
     savedSettings = Data.Instance.savedSettings;
     AddPlayers();
 }