Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //Find the object containing  profile information
        logInfo = GameObject.Find("ProfileInfo").GetComponent <LogInfo>();
        mainLog = GameObject.Find("MainLogging").GetComponent <MainLogging>();

#if UNITY_ANDROID && !UNITY_EDITOR
        //Stop idle motion
        Opie.instance().behaviours("idle_motion").stop(Opie.Behaviour.instant_action());
#endif
        extRes = GameObject.Find("LoadExternalResources").GetComponent <LoadExternalResources>();

        //If the resources folder for the selected language does not contain pictures/words subfolder,
        //then deactivate the Memory Game and Repetition Game
        // if ((Resources.LoadAll(language+"/pictures")).Length == 0){
        if (!extRes.CheckIfPicturesExist())
        {
            TextMemory.enabled = false;
            ButtonMemory.SetActive(false);
            TextRepetition.enabled = false;
            ButtonRepetition.SetActive(false);
        }
        //If the resource folder does not contain a Story subfolder, deactivate the story activity
        //if((Resources.LoadAll(language+"/story")).Length == 0){
        if (!extRes.CheckIfStoryExist())
        {
            TextStory.enabled = false;
            ButtonStory.SetActive(false);
        }
    }
Ejemplo n.º 2
0
        void HandleButtonPressEvent(Point coords, uint time, ButtonType type, ButtonModifier modifier, ButtonRepetition repetition)
        {
            if (IgnoreClicks)
            {
                return;
            }

            coords = ToUserCoords(coords);
            if (repetition == ButtonRepetition.Single)
            {
                if (type == ButtonType.Left)
                {
                    /* For OS X CTRL+Left emulating right click */
                    if (modifier == ButtonModifier.Meta)
                    {
                        HandleRightButton(coords, modifier);
                    }
                    HandleLeftButton(coords, modifier);
                }
                else if (type == ButtonType.Right)
                {
                    HandleRightButton(coords, modifier);
                }
            }
            else
            {
                HandleDoubleClick(coords, modifier);
            }
        }