Example #1
0
        /// <summary>
        /// Charge un fichier de mot de passe, ou le créer si aucun
        /// </summary>
        /// <returns>les erreurs à afficher</returns>
        public async Task <string> Valider()
        {
            var retour = Validate();

            if (string.IsNullOrWhiteSpace(retour))
            {
                //si le fichier est à créer
                if (ModeSelect.Equals(ModeOuvertureEnum.FichierACreer))
                {
                    PasswordBusiness.Password = MotDePasseA;
                    await PasswordBusiness.Save();
                }

                if (ModeSelect.Equals(ModeOuvertureEnum.FichierDejaExistant))
                {
                    if (!await PasswordBusiness.Load(MotDePasseA, true))
                    {
                        retour += ResourceLoader.GetForCurrentView("Errors").GetString("erreurOuvertureFichier");
                    }
                    else
                    {
                        if (ContexteAppli.IsCortanaActive)
                        {
                            await CortanaBusiness.CheckPassword();
                        }
                    }
                }
            }
            return(retour);
        }
Example #2
0
 // Use this for initialization
 void Start()
 {		
     //Start in the level select window
     levelSelect = 0;
     modeSelect = ModeSelect.LEVELSELECT;
     SetVisibleLevelSelect(true);
 }
 internal MainWindow(Archive a)
 {
     InitializeComponent();
       archive = a;
       if(!string.IsNullOrWhiteSpace(archive.settings.sound.backgroundSoundLoc)) {
     main = new SoundPlayer();
     main.SoundLocation = archive.settings.sound.backgroundSoundLoc.RelativeTo(Program.ArchivePath(archive));
     main.PlayLooping();
       }
       if(!string.IsNullOrWhiteSpace(archive.settings.sound.correctSoundLoc)) {
     yes = new SoundPlayer();
     yes.SoundLocation = archive.settings.sound.correctSoundLoc.RelativeTo(Program.ArchivePath(archive));
     yes.LoadAsync();
       }
       if(!string.IsNullOrWhiteSpace(archive.settings.sound.wrongSoundLoc)) {
     no = new SoundPlayer();
     no.SoundLocation = archive.settings.sound.wrongSoundLoc.RelativeTo(Program.ArchivePath(archive));
     no.LoadAsync();
       }
       Text = a.name;
       BackColor = archive.settings.backgroundColor;
       if(!string.IsNullOrWhiteSpace(archive.settings.backgroundLoc)) {
     BackgroundImage = archive.settings.background ?? Extensions.LoadImage(Program.ArchivePath(archive), archive.settings.backgroundLoc);
       }
       Current = new ModeSelect();
 }
Example #4
0
        private void InitModes()
        {
            ScoreDisplay = new ScoreDisplay(this, 1);
            ScoreDisplay.layer.enabled = false;
            BaseMode       = new BaseMode(this, 2);
            AttractMode    = new Attract(this, 20);
            SkillshotMode  = new Skillshot(this, 3);
            PagesMode      = new PageMode(this, 5);
            CellarRampMode = new CellarRamp(this, 6);
            TargetsMode    = new Targets(this, 25);
            WorkshedMode   = new WorkShed(this, 30);
            ShedMultiball  = new ShedMball(this, 35);
            BumpersMode    = new Bumpers(this, 40);
            DeadByDawnMode = new DeadByDawn(this, 50);

            SelectMode  = new ModeSelect(this, 40);
            Lindamode   = new Linda(this, 40);
            CherylMode  = new Cheryl(this, 40);
            BadHandMode = new BadHand(this, 40);
            EscapeMode  = new Escape(this, 40);
            ShellyMode  = new Shelly(this, 40);

            Modes.Add(ScoreDisplay);
            Modes.Add(BaseMode);
            Modes.Add(AttractMode);
            Modes.Add(TargetsMode);
            Modes.Add(WorkshedMode);
        }
Example #5
0
 // Use this for initialization
 void Start()
 {
     obj       = GameObject.Find("Main Camera").GetComponent <ModeSelect>();
     firstPos  = transform.GetChild(1).transform.localPosition;
     firstPos1 = transform.GetChild(2).transform.localPosition;
     cnt       = 0;
     cnt1      = 0;
 }
Example #6
0
    void Start()
    {
        //Default state is home
        CurrentState = "Home";

        //Get the buttons of the other UI
        ModeSelect = gameObject.GetComponent <ModeSelect>();

        //Link button to function
        ReturnButton.onClick.AddListener(Return);
    }
Example #7
0
 //Return to the Level Select window
 public void ReturnToLevelSelection()
 {
     if (returnButton != null)
     {
         ResetCharacterSelection();
         createButton.SetActive(false);
         SetVisibleLevelSelect(true);
         levelSelect = 0;
         currentLevelInfo = null;
         modeSelect = ModeSelect.LEVELSELECT;
     }
 }
Example #8
0
 void Start()
 {
     ms = gameObject.GetComponent<ModeSelect>();
     time = 0f;
     index = 0;
     colors = new List<Color> ();
     colors.Add (Color.cyan);
     colors.Add (Color.green);
     colors.Add (Color.magenta);
     colors.Add (Color.red);
     colors.Add (Color.yellow);
     colors.Add (Color.white);
 }
Example #9
0
    void Start()
    {
        //Link objects
        ReturnBtn  = gameObject.GetComponent <ReturnBtn>();
        ModeSelect = gameObject.GetComponent <ModeSelect>();

        //Link the play button
        PlayButton.onClick.AddListener(Play);

        //ensure all transaperent
        ConsistentUICanvas.alpha = BGCanvas.alpha = HomeUICanvas.alpha = 0;

        //fade them in
        StartCoroutine(InitialFadeEnum());
    }
Example #10
0
    private void Start()
    {
        modeSelect = GetComponent <ModeSelect>();

        //Bボタンでメニューからゲームシーンに移動
        KeyInput.Instance.OnInputB
        .ThrottleFirst(TimeSpan.FromSeconds(1))
        .Where(scene => GameStatus.SceneStatusReactivePropety.Value == SceneStatusEnum.Menu)
        .Subscribe(scene => ButtonDown())
        .AddTo(this);

        //上下キーでカーソル移動
        KeyInput.Instance.OnInputVertical
        .Where(verticl => GameStatus.SceneStatusReactivePropety.Value == SceneStatusEnum.Menu)
        .Subscribe(vertical => modeSelect.Select(vertical))
        .AddTo(this);
    }
Example #11
0
        public static void JustTouch(float x, float y)
        {
            switch (GameView.activeScene)
            {
            case "Multiplayer":
                Multiplayer.JustTouch(x, y);
                break;

            case "MainMenu":
                MainMenu.JustTouch(x, y);
                break;

            case "ModeSelect":
                ModeSelect.JustTouch(x, y);
                break;

            case "Game_Solo":
                Game_Solo.JustTouch(x, y);
                break;

            case "NumberSelect":
                NumberSelect.JustTouch(x, y);
                break;

            case "Result_Solo":
                Result_Solo.JustTouch(x, y);
                break;

            case "Rules":
                Rules.JustTouch(x, y);
                break;

            default:
                break;
            }
        }
Example #12
0
        public static void MovedTouch(float x1, float y1, float x2, float y2)
        {
            switch (GameView.activeScene)
            {
            case "Multiplayer":
                Multiplayer.MovedTouch(x1, y1, x2, y2);
                break;

            case "MainMenu":
                MainMenu.MovedTouch(x1, y1, x2, y2);
                break;

            case "ModeSelect":
                ModeSelect.MovedTouch(x1, y1, x2, y2);
                break;

            case "Game_Solo":
                Game_Solo.MovedTouch(x1, y1, x2, y2);
                break;

            case "NumberSelect":
                NumberSelect.MovedTouch(x1, y1, x2, y2);
                break;

            case "Result_Solo":
                Result_Solo.MovedTouch(x1, y1, x2, y2);
                break;

            case "Rules":
                Rules.MovedTouch(x1, y1, x2, y2);
                break;

            default:
                break;
            }
        }
Example #13
0
    void Start()
    {
        lifescript = gameObject.AddComponent<Lives>();
        //gameoverpanel.Init();
        ms = gameObject.AddComponent<ModeSelect>();

        if (ms.getMode() == 1)
        {
            mc = FindObjectOfType<Mechanic>();
        }

        if (ms.getMode() == 2)
        {
            gmc = FindObjectOfType<GrannyMechanic>();
        }

        charanimator = FindObjectOfType<CollisionPlayer>().gameObject.GetComponentInChildren<Animator>();
        sfxm = FindObjectOfType<SFXManager>().GetComponent<SFXManager>();
        audiom = FindObjectOfType<AudioRegulator>().gameObject;
        lives = 3;
        realTime = 0f;
        slowdown = false;
        badtrip = false;
        activeSlow = false;
        activeTrip = false;
    }
Example #14
0
    public void SetupCharacterSelection(LevelCreationInfo levelInfo)
    {
        currentLevelInfo = levelInfo;
        currentLevelInfo.LoadCharacters();
        
        SetVisibleLevelSelect(false);
        modeSelect = ModeSelect.CHARACTERSELECT;

        charactersTable.SetCharactersList(currentLevelInfo.levelCharacters);
        charactersTable.CreateTable(currentLevelInfo.levelCharacters);
    }
Example #15
0
    // Use this for initialization
    void Start()
    {
        ms = gameObject.AddComponent<ModeSelect>();
        obl.Init();
        pwl.Init();
        objpos.Init();
        ritmeObject = false;
        ritmePowerup = false;
        placeCar = false;

        timeObject = 2.5f;
        timePowerup = 9f;
        timeCar = 20f;
        speed = 0.0f;
        round = 25f;
        multi = 1f;
        startPos = -160f;
    }
Example #16
0
 void Start()
 {
     ms = gameObject.AddComponent<ModeSelect>();
     lifescript = gameObject.AddComponent<Lives>();
     life1.sprite = lifesprite;
     life2.sprite = lifesprite;
     life3.sprite = lifesprite;
     previouslifes = lifescript.returnLives();
     gameover = false;
 }
Example #17
0
    private void Update()
    {
        if (modeSelect == ModeSelect.teach)
        {
            if (phoneTeach == false)
            {
                phone.GetComponent <ShowPhone>().onScreen = true;
            }

            if (Velocity.GetComponent <Rigidbody>().velocity.magnitude == 0)
            {
                if (addedMoveMsg == false)
                {
                    msgs.GetComponent <messageController>().AddMsg(true, "look at the trolley, hold Left and Right mouse buttons to move");
                    addedMoveMsg = true;
                }
            }
            if (Velocity.GetComponent <Rigidbody>().velocity.magnitude > 1)
            {
                if (moved == false)
                {
                    msgs.GetComponent <messageController>().AddMsg(false, "Yes i am a Pro!");
                    msgs.GetComponent <messageController>().AddMsg(true, "Great!");
                    msgs.GetComponent <messageController>().AddMsg(true, "Now go to any item and left click it to put it in the trolley");
                    moved = true;
                }
            }

            if (TeachItemPick == true)
            {
                if (teachPhone == false)
                {
                    phoneTeach = true;
                    msgs.GetComponent <messageController>().AddMsg(false, "I've so got this!");
                    msgs.GetComponent <messageController>().AddMsg(true, "Perfect!");
                    msgs.GetComponent <messageController>().AddMsg(true, "now use the scroll wheel to hide and show the phone");
                    teachPhone = true;
                }
            }

            if (phone.GetComponent <ShowPhone>().onScreen == false)
            {
                teachComplete = true;
            }

            if (phone.GetComponent <ShowPhone>().onScreen == true && teachComplete == true)
            {
                if (done == false)
                {
                    msgs.GetComponent <messageController>().AddMsg(false, "Got it");
                    msgs.GetComponent <messageController>().AddMsg(true, "Okay thats it, now lets do some shopping!");
                    msgs.GetComponent <messageController>().AddMsg(true, "Also... try not to make a mess of it");
                    done = true;
                }



                timer += 1 * Time.deltaTime;

                print(timer);

                if (timer > 3)
                {
                    modeSelect = RequestList.ModeSelect.test;
                    GetComponent <GameLoop>().gameState = RequestList.ModeSelect.test;
                }
            }
        }
        if (modeSelect == ModeSelect.test)
        {
            inLevel = testRequestList;


            if (index < 4)
            {
                if (current != inLevel[index])
                {
                    GetComponent <GameLoop>().BumpScore();
                    current = inLevel[index];
                    mController.AddMsg(true, current.RequestMessage);
                }
            }
            else
            {
                current = null;
                if (testComplete == false)
                {
                    msgs.GetComponent <messageController>().AddMsg(true, "head to the exit when you're ready!");
                    testComplete = true;
                }
                print("Win");
                win = true;
            }
        }
        if (modeSelect == ModeSelect.challenge)
        {
            while (inLevel.Count < 8)
            {
                int toUse = Random.Range(0, itemRequestList.Count);

                inLevel.Add(itemRequestList[toUse]);
                itemRequestList.RemoveAt(toUse);
            }

            if (index < 8)
            {
                if (current != inLevel[index])
                {
                    GetComponent <GameLoop>().BumpScore();
                    current = inLevel[index];
                    mController.AddMsg(true, current.RequestMessage);
                }
            }
            else
            {
                current = null;
                print("Win");
                if (win == false)
                {
                    msgs.GetComponent <messageController>().AddMsg(true, "Quick, get out before they lock up!");

                    win = true;
                }
            }



            // mController.AddMsg(itemRequestList[Random.Range(0, itemRequestList.Count)]);
        }
    }