示例#1
0
    void Start()
    {
        ANDROID_RATE_URL = "market://details?id=com.AlexChatham.Hellscape";
        IOS_RATE_URL     = "https://itunes.apple.com/us/app/apple-store/id1356756930?mt=8";
        SP           = StartPanel.instance;
        fslide.value = PlayerPrefs.GetInt("speed", 1);
        switch ((int)fslide.value)
        {
        case 0:
            speedText.text = "Slow";
            break;

        case 1:
            speedText.text = "Normal";
            break;

        case 2:
            speedText.text = "Fast";
            break;

        case 3:
            speedText.text = "Faster";
            break;

        default:
            break;
        }
        vslide.value = PlayerPrefs.GetInt("Volume", 20);
        VolumeSelect(PlayerPrefs.GetInt("Volume", 20));
        sfxslide.value = PlayerPrefs.GetInt("SfxVolume", 20);
        InitializeSfx();
    }
示例#2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#3
0
 public Form1()
 {
     InitializeComponent();
     StartPanel.Show();
     SigninPanel.Hide();
     SignupPanel.Hide();
 }
示例#4
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            _instance = this;
        }
        if (PlayerPrefs.HasKey("LevelId"))
        {
            currentLevel = PlayerPrefs.GetInt("LevelId");
        }
        else
        {
            PlayerPrefs.SetInt("LevelId", currentLevel);
        }
        if (PlayerPrefs.HasKey("HighestScore"))
        {
            bestScore = PlayerPrefs.GetInt("HighestScore");
        }
        else
        {
            PlayerPrefs.SetInt("HighestScore", bestScore);
        }
        if (PlayerPrefs.GetInt("UseMenu").Equals(1) || !PlayerPrefs.HasKey("UseMenu"))
        {
            StartPanel.SetActive(true);
            PlayerPrefs.SetInt("UseMenu", 1);
        }
        else if (PlayerPrefs.GetInt("UseMenu").Equals(0))
        {
            InGamePanel.SetActive(true);
        }

        if (!PlayerPrefs.HasKey("VIBRATION"))
        {
            PlayerPrefs.SetInt("VIBRATION", 1);
            VibrationButton.GetComponent <Image>().sprite = on;
        }
        else
        {
            if (PlayerPrefs.GetInt("VIBRATION") == 1)
            {
                VibrationButton.GetComponent <Image>().sprite = on;
            }
            else
            {
                VibrationButton.GetComponent <Image>().sprite = off;
            }
        }
        if (SoundManager.Instance == null)
        {
            Instantiate(soundManager);
        }
        BestScoreText.text = currentScore.ToString();
        InitializeLevel();
    }
示例#5
0
    void OnGUI()
    {
        if (!IsConstellationSelected())
        {
            StartPanel.Draw(this);
            return;
        }
        else
        {
            try
            {
                TopBarPanel.Draw(this, this, this);
                var constellationName = NodeTabPanel.Draw(ScriptDataService.OpenedScripts.ToArray());
                if (constellationName != null)
                {
                    var selectedGameObjects = Selection.gameObjects;
                    if (Application.isPlaying)
                    {
                        ScriptDataService.CloseCurrentConstellationInstance();
                        Open(ScriptDataService.OpenedScripts.ToArray()[0]);
                        previousSelectedGameObject = selectedGameObjects[0];
                    }
                    Open(constellationName);
                }
                var constellationToRemove = NodeTabPanel.ConstellationToRemove();
                EditorGUILayout.BeginHorizontal();
                if (NodeWindow == null)
                {
                    ParseScript();
                }
                NodeWindow.UpdateSize(position.width - nodeSelectorWidth - splitThickness, position.height - NodeTabPanel.GetHeight());
                NodeWindow.Draw(RequestRepaint, OnEditorEvent, ScriptDataService.GetConstellationEditorConfig(), out nodeWindowSize, out nodeWindowScrollPosition);
                DrawVerticalSplit();
                NodeSelector.Draw(nodeSelectorWidth, position.height, NodeAdded, ScriptDataService.Script.CanChangeType);
                EditorGUILayout.EndHorizontal();
                if (ScriptDataService.CloseOpenedConstellation(constellationToRemove))
                {
                    if (ScriptDataService.OpenedScripts.Count > 0)
                    {
                        Open(ScriptDataService.OpenedScripts[0]);
                    }
                    else
                    {
                        ScriptDataService.Script = null;
                    }
                }
                DrawInstancePannel();
            }
            catch (System.Exception exception)
            {
                UnexpectedError(exception.StackTrace);
            }
        }

        if (requestRepaint)
        {
            Repaint();
        }
    }
示例#6
0
 public void Start()
 {
     paused    = false;
     gameEnded = false;
     pausePanel.SetActive(false);
     StartPanel.SetActive(true);
     WinPanel.SetActive(false);
 }
示例#7
0
 private void logout_Click_1(object sender, EventArgs e)
 {
     MessagePanel.Hide();
     SigninPanel.Hide();
     RequestPanel.Hide();
     AvailablePanel.Hide();
     StartPanel.Show();
 }
示例#8
0
        private void CreateStartPanel()
        {
            var startPanel = new StartPanel();

            startPanel.SetBinding(StartPanel.BindingContextProperty, "StartViewModel");
            startPanel.SetBinding(StartPanel.IsVisibleProperty, new Binding("State", BindingMode.OneWay, _indexToBoolConverter, AppConstants.APP_PANEL_START, null, this));

            _startPanel = startPanel;
        }
示例#9
0
 IEnumerator GameStart()
 {
     while (!Input.GetKeyDown(KeyCode.Space) && !Input.GetKeyDown(KeyCode.JoystickButton1))
     {
         yield return(null);
     }
     StartPanel.SetActive(false);
     if (pool.CardCreate())
     {
         StartCoroutine(PointSet());
     }
 }
示例#10
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     if (File.Exists(@Utility.LOCKPATH))
     {
         StartPanel.Hide();
         CalculateResult();
     }
     else
     {
         MessageBox.Show("Voting lock doesn't exist", "Server Plus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
    // Use this for initialization
    void Start()
    {
        start       = new StartPanel(StartPanel);
        credit      = new CreditPanel(CreditPanel);
        instruction = new InstructionPanel(InstructionPanel);

        start.animator       = StartPanel.GetComponent <Animator>();
        credit.animator      = CreditPanel.GetComponent <Animator>();
        instruction.animator = InstructionPanel.GetComponent <Animator>();

        start.Start();
        credit.Start();
        instruction.Start();
    }
示例#12
0
    public void next()
    {
        Time.timeScale = 1;
        StartPanel sp = GameObject.Find("Canvas").transform.Find("StartPanel").GetComponent <StartPanel>();

        sp.stageNum++;
        if (sp.stageNum > 10)
        {
            sp.stageNum = 10;
        }
        StageManager.Instance.stageReset();
        GameObject.Find("Canvas").transform.Find("StartPanel").gameObject.SetActive(true);
        gameObject.SetActive(false);
    }
示例#13
0
    public void InitNewGame()
    {
        if (StartPanel)
        {
            StartPanel.SetActive(true);
        }

        GameTitle.text  = GameParameters.GameName;
        CurrentLocation = null;

        HideTemplates();
        DeactivateButton(StartButton);

        FillLocations();
    }
示例#14
0
    void Awake()
    {
        instance        = this;
        startPanel      = transform.Find("PanelStart").GetComponent <StartPanel>();
        newGamePanel    = transform.Find("PanelNewGame").GetComponent <NewGamePanel>();
        joinGamePanel   = transform.Find("PanelJoinGame").GetComponent <JoinGamePanel>();
        settingPanel    = transform.Find("PanelSetting").GetComponent <SettingPanel>();
        exitPanel       = transform.Find("PanelExit").GetComponent <ExitPanel>();
        messagePanel    = transform.Find("PanelMessage").GetComponent <MessagePanel>();
        playerInfoPanel = transform.Find("PanelPlayerInfo").GetComponent <PlayerInfoPanel>();
        teamPanel       = transform.Find("PanelTeam").GetComponent <TeamPanel>();
        shopPanel       = transform.Find("PanelShop");

        curHangingText  = transform.Find("CurHanging").GetComponent <Text>();
        curInGamingText = transform.Find("CurInGaming").GetComponent <Text>();
    }
示例#15
0
    public void Init(GameManager manager)
    {
        this.manager = manager;
        instance     = this;

        panelList  = new List <UIPanel>();
        popUpQueue = new Queue <UIPanel>();

        hStartPanel    = initPanel(StartPanel, PanelType.StartPanel) as StartPanel;
        hSettlePanel   = initPanel(SettlePanel, PanelType.SettlePanel) as SettlePanel;
        hGamePanel     = initPanel(GamePanel, PanelType.GamePanel) as GamePanel;
        hGameOverPanel = initPanel(GameOverPanel, PanelType.GameOverPanel) as GameOverPanel;

        SortPanel();

        ShowSpecialPanel(PanelType.StartPanel);
    }
示例#16
0
        private void LoadBeatmapInfo()
        {
            artistText.text  = CurrentBeatmaps[CurrentIndex].Artist;
            authorText.text  = CurrentBeatmaps[CurrentIndex].Author;
            densityText.text = CurrentBeatmaps[CurrentIndex].Density.ToString();
            //Debug.Log(CurrentBeatmaps[CurrentIndex].FilePath);

            animationObj.Play("SelectSong_BeatmapSelected", 0, 0);
            if (!DensityPanel.activeSelf)
            {
                DensityPanel.SetActive(true);
            }
            if (!OptionPanel.activeSelf)
            {
                OptionPanel.SetActive(true);
            }
            if (!StartPanel.activeSelf)
            {
                StartPanel.SetActive(true);
            }
        }
 void OnGUI()
 {
     if (!IsConstellationSelected())
     {
         StartPanel.Draw(this);
         return;
     }
     else
     {
         TopBarPanel.Draw(this, this, this, this);
         var constellationName = NodeTabPanel.Draw(ScriptDataService.currentPath.ToArray(), null);
         if (constellationName != null)
         {
             Open(constellationName);
         }
         var constellationToRemove = NodeTabPanel.ConstellationToRemove();
         EditorGUILayout.BeginHorizontal();
         if (NodeWindow == null)
         {
             ParseScript();
         }
         NodeWindow.UpdateSize(position.width - nodeSelectorWidth - splitThickness, position.height - NodeTabPanel.GetHeight());
         NodeWindow.Draw(RequestRepaint, OnEditorEvent);
         DrawVerticalSplit();
         NodeSelector.Draw(nodeSelectorWidth, position.height, NodeAdded);
         EditorGUILayout.EndHorizontal();
         if (ScriptDataService.CloseOpenedConstellation(constellationToRemove))
         {
             if (ScriptDataService.currentPath.Count > 0)
             {
                 Open(ScriptDataService.currentPath[0]);
             }
         }
         DrawInstancePannel();
     }
 }
    public void SetServer(string name, Color color)
    {
        StartPanel panel = GetPanel(UIPanelType.Start) as StartPanel;

        panel.SetServer(name, color);
    }
示例#19
0
        public MainWindow()
        {
            Controller = new AppController();
            Controller.ReportException = this.ReportException;
            InitializeComponent();


            this.Icon = Extensions.LoadIconFromName("ANNdotNet.Wnd.Dll.Images.anndotnet.ico");

            #region additional initialization
            this.startPanel1 = new ANNdotNet.Wnd.Dll.Panels.StartPanel();
            this.expPanel1   = new ExperimentPanel();
            this.runPanel1   = new RunPanel();
            this.testPanel1  = new TestPanel();
            this.infoPanel1  = new InfoPanel();

            //
            // startPanel1
            //
            this.startPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.startPanel1.Dock         = System.Windows.Forms.DockStyle.Fill;
            this.startPanel1.Location     = new System.Drawing.Point(0, 0);
            this.startPanel1.Margin       = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.startPanel1.Name         = "startPanel1";
            this.startPanel1.New          = null;
            this.startPanel1.Open         = null;
            this.startPanel1.Size         = new System.Drawing.Size(762, 395);
            this.startPanel1.TabIndex     = 0;

            //
            // expPanel1
            //
            this.expPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.expPanel1.Location = new System.Drawing.Point(3, 3);
            this.expPanel1.Name     = "expPanel1";
            this.expPanel1.Size     = new System.Drawing.Size(463, 222);
            this.expPanel1.ShowOptionPanel();
            this.expPanel1.TabIndex = 0;
            //
            // runPanel1
            //
            this.infoPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.infoPanel1.Location = new System.Drawing.Point(3, 3);
            this.infoPanel1.Name     = "runPanel1";
            this.infoPanel1.Size     = new System.Drawing.Size(463, 222);
            this.infoPanel1.TabIndex = 1;

            //
            // runPanel1
            //
            this.runPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.runPanel1.Location = new System.Drawing.Point(3, 3);
            this.runPanel1.Name     = "runPanel1";
            this.runPanel1.Size     = new System.Drawing.Size(463, 222);
            this.runPanel1.TabIndex = 0;

            //
            // testPanel1
            //
            this.testPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.testPanel1.Location = new System.Drawing.Point(3, 3);
            this.testPanel1.Name     = "testPanel1";
            this.testPanel1.Size     = new System.Drawing.Size(463, 222);
            this.testPanel1.TabIndex = 0;

            //
            this.splitContainer1.Panel2.Controls.Add(this.startPanel1);
            this.tabPage5.Controls.Add(runPanel1);
            this.tabPage7.Controls.Add(testPanel1);
            this.tabPage1.Controls.Add(expPanel1);
            this.tabPage2.Controls.Add(infoPanel1);

            #endregion
            treeView1.LabelEdit  = true;
            this.Load           += MainWindow_Load;
            this.FormClosing    += MainWindow_FormClosing;
            this.ribbonTab1.Text = AboutANNdotNET.AssemblyTitle;

            SetStopMode("");
            //setup expanel
            expPanel1.LockEncoding     = true;
            expPanel1.DefaultBEncoding = DataProcessing.MLBasicTypes.CategoryEncoding.OneHot;
        }
示例#20
0
 void Start()
 {
     SP = StartPanel.instance;
 }
示例#21
0
 private void Back_Click(object sender, EventArgs e)
 {
     StartPanel.Show();
     SignupPanel.Hide();
 }
示例#22
0
 private void Calculation_Load(object sender, EventArgs e)
 {
     StartPanel.Show();
 }
示例#23
0
 void Start()
 {
     SP = StartPanel.instance;
     selectCharacter(PlayerPrefs.GetInt("Character", 0));
     checkUnlocked();
 }
示例#24
0
 void InitStartPanel()
 {
     startPanel = CreateUIObj <StartPanel>(UIPANEL.StartPanel);
 }
示例#25
0
 //Начать игру
 public void StartGame()
 {
     StartPanel.SetActive(false);
     GameStarted(currentLocation);
 }
示例#26
0
 void pause()
 {
     paused = !paused;
     pausePanel.SetActive(paused);
     StartPanel.SetActive(false);
 }
示例#27
0
 void StartGame()
 {
     StartPanel.SetActive(false);
     Controller.instance.StartGame();
 }
示例#28
0
 void Awake()
 {
     sharedInstance = this;
 }