Пример #1
0
	void Awake()
	{
		if (_instance == null)
		{
			_instance = this;
			DontDestroyOnLoad(this);
		}
		else 
		{
			if (this != _instance)	
				Destroy (this.gameObject);
		}
	}
Пример #2
0
    /// <summary>
    /// load list profile from Etek
    /// this function called when Start and after Add Profile
    /// </summary>
    void LoadListProfile()
    {
        // load list profile into arrayStr_Profile
        if (arrayStr_Profile.Count != 0)
        {
            arrayStr_Profile.Clear();
        }
        int sizeOfProfile = EmoProfileManagement.GetProfilesArraySize();

        for (int i = 0; i < sizeOfProfile; i++)
        {
            arrayStr_Profile.Add(EmoProfileManagement.GetProfileName(i));
        }
    }
Пример #3
0
    /// <summary>
    /// when the profile button with profileID is click on ListProfile Window
    /// set the current profile = profile which has this ID
    /// profileID also is the possition of the profile in the array (list) profile
    /// </summary>
    /// <param name="profileID"></param>
    void OnProfileClickOK(int profileID)
    {
        str_Profile = arrayStr_Profile[profileID].ToString();// arrayStr_Profile[profileID];

        EpocManager.SendMessage("SetUserProfile", str_Profile);
        bool[] tempBool  = EmoProfileManagement.CheckCurrentProfile();
        int    numAction = 0;

        for (int i = 0; i < tempBool.Length; i++)
        {
            if (tempBool[i])
            {
                str_ActionChoose[numAction] = array_CogActionList[i];
                numAction++;
            }
        }
        if (numAction <= 2)
        {
            str_ActionChoose[numAction] = "Choose Action";
        }
    }
Пример #4
0
 private void Update()
 {
     this.numOfProfile = EmoProfileManagement.GetProfilesArraySize();
     this.currentDir   = Directory.GetCurrentDirectory();
 }