Inheritance: MonoBehaviour
示例#1
0
 private void btn_Register_Click(object sender, EventArgs e)
 {
     verificare();
     if (GUIController.isValidEmail(textEmail.Text))
     {
         User user = new User();
         user.Email    = textEmail.Text;
         user.FullName = textFullName.Text;
         user.Password = GUIController.encrypt(textPassword.Text);
         UserDao.register(user);
         if (GUIController.checkRegisterSucces == true)
         {
             //  Dashboard.Instance.PnlContainer.Controls["UserRegister"].Dispose();
             textEmail.Clear();
             textFullName.Clear();
             textPassword.Clear();
             UserLogin login = new UserLogin();
             login.Dock = DockStyle.Fill;
             Dashboard.Instance.PnlContainer.Controls.Add(login);
             Dashboard.Instance.PnlContainer.Controls["UserLogin"].BringToFront();
         }
         else
         {
             textPassword.Clear();
             textEmail.Clear();
         }
     }
     else
     {
         MessageBox.Show("Email-ul nu este intr-un format valid", "Atentionare", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         textEmail.Clear();
     }
 }
示例#2
0
 public TextParserComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     RecreateDocument();
     _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("textparser.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Text Parser", ICON_KEY);
 }
示例#3
0
        void Start()
        {
            this.restartController = new RestartController(this, this.dataCenter, this.inputProviderPlayer1);

            movementeControllerPlayer1 = new MovementController(this.inputProviderPlayer1, this.moverPlayer1, this);
            movementeControllerPlayer2 = new MovementController(this.inputProviderPlayer2, this.moverPlayer2, this);

            shootControllerPlayer1 = new ShootController(inputProviderPlayer1, dataCenter.fireRate, dataCenter.laser1,
                                                         dataCenter.ship1, this);

            shootControllerPlayer2 = new ShootController(inputProviderPlayer2, dataCenter.fireRate, dataCenter.laser2,
                                                         dataCenter.ship2, this);

            defenseControllerPlayer1 = new DefenseController(inputProviderPlayer1, dataCenter.ship1, dataCenter.tower1,
                                                             dataCenter.barrier1, dataCenter.towerPrice, dataCenter.barrierPrice, dataCenter.pointPlayer1, this);

            defenseControllerPlayer2 = new DefenseController(inputProviderPlayer2, dataCenter.ship2, dataCenter.tower2,
                                                             dataCenter.barrier2, dataCenter.towerPrice, dataCenter.barrierPrice, dataCenter.pointPlayer2, this);
            ///--------------------------------------------------------------------------------------------------
            ///Criadas por Lael
            this.colliderControllerPlayer1 = new ColliderController(this.dataCenter.colliderCheckerPlayer1, this.dataCenter.lifePlayer1, this.pointsPlayer2, this);
            this.colliderControllerPlayer2 = new ColliderController(this.dataCenter.colliderCheckerPlayer2, this.dataCenter.lifePlayer2, this.pointsPlayer1, this);
            this.gameOverController        = new GameOverController(this.dataCenter.lifePlayer1, this.dataCenter.lifePlayer2, this);
            ///--------------------------------------------------------------------------------------------------

            this.guiControllerPlayer1 = new GUIController(dataCenter.guiContainerPlayer1.points, dataCenter.guiContainerPlayer1.healh,
                                                          dataCenter.pointPlayer1, dataCenter.lifePlayer1, this);

            this.guiControllerPlayer2 = new GUIController(dataCenter.guiContainerPlayer2.points, dataCenter.guiContainerPlayer2.healh,
                                                          dataCenter.pointPlayer2, dataCenter.lifePlayer2, this);
        }
示例#4
0
    void Start()
    {
        GameObject gameController = GameObject.Find("GameController");

        AchTrackerScript = (AchievementTrackerScript)gameController.GetComponent(typeof(AchievementTrackerScript));
        guiController    = (GUIController)gameController.GetComponent(typeof(GUIController));
    }
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#6
0
    private AppSettings()
    {
        _floatingJoystick = GUIController.GetInstance().Playing.GetComponentInChildren <FloatingJoystick>(true);
        _fixedJoystick    = GUIController.GetInstance().Playing.GetComponentInChildren <Joystick>(true);
        SetJoystick(false);
//        SetAvatar("a1");
    }
 private void EscButton()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         GUIController.SetMenu();
     }
 }
示例#8
0
        public static bool __PerformTest__(string phrase, string expected, bool debug = false)
        {
            double result = Parse(phrase, debug);

            double difference = Math.Abs(result - double.Parse(expected));

            if (debug)
            {
                GUIController.LogOutput($"Parsing: {phrase}\nExpected: {expected}\nGot: {result}\nDifference: {difference}");
            }

            // 0.00000000000000001 is an arbitrary value; a small value is required to be able to differentiate
            // incorrect calculations from floating point error calculations
            if (difference != 0 && difference < 0.00000000000000001)
            {
                GUIController.LogOutput("Phrase: {phrase}, Passed: True (floating point inaccuracy)");

                return(true);
            }
            else
            {
                GUIController.LogOutput($"Phrase: {phrase}, Passed: {result.ToString() == expected}");

                return(result.ToString() == expected);
            }
        }
示例#9
0
 public LipSyncComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     RecreateDocument();
     _guiController.RegisterIcon("LipSyncIcon", Resources.ResourceManager.GetIcon("lips.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Lip sync", "LipSyncIcon");
 }
示例#10
0
        public PluginsComponent(GUIController guiController, AGSEditor agsEditor, AGSEditorController pluginEditorController)
            : base(guiController, agsEditor)
        {
            _pluginEditorController = pluginEditorController;

            foreach (string fullFileName in Utilities.GetDirectoryFileList(_agsEditor.EditorDirectory, PLUGIN_SEARCH_MASK))
            {
                string fileName = Path.GetFileName(fullFileName).ToLower();
                // Don't process our editor .net dlls
                if (!fileName.StartsWith("ags."))
                {
                    LoadRuntimePluginIntoMemory(fileName);
                }
                else if (fileName.StartsWith("ags.plugin."))
                {
                    LoadEditorPluginIntoMemory(fileName);
                }
            }

            _guiController.RegisterIcon("PluginIcon", Resources.ResourceManager.GetIcon("plugin.ico"));
            _guiController.RegisterIcon("PluginDisabledIcon", Resources.ResourceManager.GetIcon("pluginDisabled.ico"));
            _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Plugins", "PluginIcon");
            RepopulateTreeView();

            _agsEditor.GetScriptHeaderList += new GetScriptHeaderListHandler(AGSEditor_GetScriptHeaderList);
            _agsEditor.Tasks.GetFilesForInclusionInTemplate += new Tasks.GetFilesForInclusionInTemplateHandler(AGSEditor_GetFilesForInclusionInTemplate);
            _agsEditor.Tasks.NewGameFilesExtracted += new Tasks.NewGameFilesExtractedHandler(AGSEditor_NewGameFilesExtracted);
            Factory.Events.GetAboutDialogText += new EditorEvents.GetAboutDialogTextHandler(Events_GetAboutDialogText);
        }
示例#11
0
 public SpeechComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _agsEditor.ExtraCompilationStep += new AGSEditor.ExtraCompilationStepHandler(_agsEditor_ExtraCompilationStep);
     _agsEditor.ExtraOutputCreationStep += new AGSEditor.ExtraOutputCreationStepHandler(_agsEditor_ExtraOutputCreationStep);
     _agsEditor.GetSourceControlFileList += new GetSourceControlFileListHandler(_agsEditor_GetSourceControlFileList);
 }
示例#12
0
    public GUIButtonAlpha(string _texture, float?leftPos, float?topPos, float?rightPos, float?botPos, float widthInPixels, float heightInPixels, float _layer = 0, bool _useScale = false) : base(false)
    {
        gameObject = GamePullController.CreateButtonAlpha();
        animation  = new ObjectAnimation(gameObject);

        layer    = _layer;
        useScale = _useScale;

        textureName  = _texture;
        sizeInPixels = new Vector2(widthInPixels, heightInPixels);

        if (leftPos != null)
        {
            left = leftPos;
        }
        if (topPos != null)
        {
            top = topPos;
        }

        if (rightPos != null)
        {
            right = rightPos;
        }

        if (botPos != null)
        {
            bottom = botPos;
        }

        isClickable = true;

        GUIController.Add(gameObject, this);
    }
        private void TryExecuteCommand(string commandText, bool voice = false)
        {
            if (voice)
            {
                if (!MainGUI.Reference.microphoneToggle)
                {
                    return;
                }

                GUIController.LogOutput($"Voice Detected: {commandText}");
            }

            try{
                Command command = new Command(commandText, debug);

                string result = command.Execute();

                GUIController.LogOutput(result);

                if (MainGUI.Reference.voiceOutputToggle)
                {
                    synthesiser.SpeakAsyncCancelAll();

                    this.speaking = true;

                    synthesiser.SpeakAsync(result);
                }
            }
            catch {
                GUIController.LogOutput("An error occurred when processing that request.");
            }
        }
示例#14
0
    // Use this for initialization
    void Start()
    {
        ship         = GetComponentInChildren <StarshipController>();
        gui          = GetComponent <GUIController>();
        frontMessage = GetComponentInChildren <FrontMessage>();
        mainTimer    = GetComponentInChildren <MainTimer>();
        bar          = GetComponentInChildren <Bar>();
        speedCounter = GetComponentInChildren <SpeedCounter>();
        oobAudio     = GetComponentInChildren <OutOfBoundsAudio>();
        fuelAlarm    = GetComponentInChildren <FuelAlarm>();
        lowFuelText  = GetComponentInChildren <LowFuelText>();

        timeLeft     = 10f;     //!!!!
        currentSpeed = minimumSpeed;
        fuel         = 100f;

        theLevel = GetComponent <TheLevel>();


        foreach (Transform child in transform)
        {
            if (child.name == "StarsNear")
            {
                starsNear = child.GetComponent <Stars>();
            }
            else if (child.name == "StarsMedium")
            {
                starsMedium = child.GetComponent <Stars>();
            }
            else if (child.name == "StarsFar")
            {
                starsFar = child.GetComponent <Stars>();
            }
        }
    }
示例#15
0
 public LipSyncComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     RecreateDocument();
     _guiController.RegisterIcon("LipSyncIcon", Resources.ResourceManager.GetIcon("lips.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Lip sync", "LipSyncIcon");
 }
    // Called by Unity just before any of the Update methods is called the first time.
    public void Start()
    {
        // Obtain a reference to the dfButton instance attached to this object
        this._button = GetComponent<dfButton>();

        gui = GameObject.Find("UI Root").GetComponent<GUIController>();
    }
示例#17
0
 public void Control(GUIController gui)
 {
     #region Standard GUI
     GUI.skin = gui.gui_skin;
     GUI_Elements.HUDElements(new Rect(0, 0, 75, 50), gui.ore, gui.main.numOfGears);
     #endregion
 }
示例#18
0
    void EnableTutorial()
    {
        if (!tutorialCamera.TutorialsEnabled())
        {
            return;
        }

        tutorialCamera.ShowTutorialText("Click glowing objects to grapple", false);

        GUIController.DisableButtons();

#if UNITY_ANDROID || UNITY_IPHONE
        //GUIController.ShowText("Tutorial", "Tap glowing objects to grapple");
#else
        //GUIController.ShowText("Tutorial", "Click glowing objects to grapple");
#endif

        GameObject.Find("Player").GetComponent <GrapplingHook>().currentTutorial = gameObject;

        //outline.enabled = true;

        GUIController.EnableImage("Tap");

        SendMessage("ActivateSlowDown");
    }
示例#19
0
    void Start()
    {
        guiController    = (GUIController)gameObject.GetComponent(typeof(GUIController));
        achTrackerScript = (AchievementTrackerScript)gameObject.GetComponent(typeof(AchievementTrackerScript));

        score = 0;
    }
示例#20
0
 public TextParserComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     RecreateDocument();
     _guiController.RegisterIcon("TextParserIcon", Resources.ResourceManager.GetIcon("textparser.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Text Parser", "TextParserIcon");
 }
示例#21
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#22
0
 public PaletteComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     Init();
     _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("iconpal.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Colours", ICON_KEY);
 }
示例#23
0
        public BuildCommandsComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            ScriptEditor.AttemptToEditScript   += new ScriptEditor.AttemptToEditScriptHandler(ScriptEditor_AttemptToEditScript);
            _guiController.QueryEditorShutdown += new GUIController.QueryEditorShutdownHandler(guiController_QueryEditorShutdown);
            _guiController.InteractiveTasks.TestGameStarting += new InteractiveTasks.TestGameStartingHandler(AGSEditor_TestGameStarting);
            _guiController.InteractiveTasks.TestGameFinished += new InteractiveTasks.TestGameFinishedHandler(AGSEditor_TestGameFinished);
            _guiController.RegisterIcon("BuildIcon", Resources.ResourceManager.GetIcon("build.ico"));
            _guiController.RegisterIcon("RunIcon", Resources.ResourceManager.GetIcon("run.ico"));
            _guiController.RegisterIcon("StepIcon", Resources.ResourceManager.GetIcon("step.ico"));
            _guiController.RegisterIcon("StopIcon", Resources.ResourceManager.GetIcon("stop.ico"));
            _guiController.RegisterIcon("PauseIcon", Resources.ResourceManager.GetIcon("pause.ico"));
            _guiController.RegisterIcon("RunMenuIcon", Resources.ResourceManager.GetIcon("menu_build_run.ico"));
            _guiController.RegisterIcon("StepMenuIcon", Resources.ResourceManager.GetIcon("menu_build_step-into.ico"));
            _guiController.RegisterIcon("StopMenuIcon", Resources.ResourceManager.GetIcon("menu_build_stop.ico"));
            _guiController.RegisterIcon("PauseMenuIcon", Resources.ResourceManager.GetIcon("menu_build_pause.ico"));
            _guiController.RegisterIcon("RebuildAllMenuIcon", Resources.ResourceManager.GetIcon("menu_build_rebuild-files.ico"));
            _guiController.RegisterIcon("SetupGameMenuIcon", Resources.ResourceManager.GetIcon("menu_build_gamesetup.ico"));

            _guiController.RegisterIcon("MenuIconBuildEXE", Resources.ResourceManager.GetIcon("menu_file_built-exe.ico"));
            _guiController.RegisterIcon("MenuIconTest", Resources.ResourceManager.GetIcon("menu_build_runwithout.ico"));

            _guiController.AddMenu(this, DEBUG_MENU_ID, "&Build");
            MenuCommands debugCommands = new MenuCommands(DEBUG_MENU_ID, GUIController.FILE_MENU_ID);

            debugCommands.Commands.Add(new MenuCommand(RUN_COMMAND, "&Run", Keys.F5, "RunMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(TEST_GAME_COMMAND, "Run without &debugger", Keys.Control | Keys.F5, "MenuIconTest"));
            debugCommands.Commands.Add(new MenuCommand(STEP_INTO_COMMAND, "S&tep into", Keys.F11, "StepMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(PAUSE_COMMAND, "&Pause", "PauseMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(STOP_COMMAND, "&Stop", Keys.Shift | Keys.F5, "StopMenuIcon"));
            debugCommands.Commands.Add(MenuCommand.Separator);
            debugCommands.Commands.Add(new MenuCommand(COMPILE_GAME_COMMAND, "&Build EXE", Keys.F7, "MenuIconBuildEXE"));
            debugCommands.Commands.Add(new MenuCommand(REBUILD_GAME_COMMAND, "Rebuild &all files", "RebuildAllMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(SETUP_GAME_COMMAND, "Run game setu&p...", "SetupGameMenuIcon"));
            _guiController.AddMenuItems(this, debugCommands);

            _guiController.SetMenuItemEnabled(this, STEP_INTO_COMMAND, false);
            _guiController.SetMenuItemEnabled(this, PAUSE_COMMAND, false);
            _guiController.SetMenuItemEnabled(this, STOP_COMMAND, false);

            MenuCommand buildIcon = new MenuCommand(COMPILE_GAME_COMMAND, "Build game EXE (F7)", "BuildIcon");
            MenuCommand runIcon   = new MenuCommand(RUN_COMMAND, "Run (F5)", "RunIcon");
            MenuCommand stopIcon  = new MenuCommand(STOP_COMMAND, "Stop", "StopIcon");
            MenuCommand stepIcon  = new MenuCommand(STEP_INTO_COMMAND, "Step into (F11)", "StepIcon");
            MenuCommand pauseIcon = new MenuCommand(PAUSE_COMMAND, "Pause", "PauseIcon");

            stepIcon.Enabled  = false;
            stopIcon.Enabled  = false;
            pauseIcon.Enabled = false;
            _debugToolbarCommands.Add(buildIcon);
            _debugToolbarCommands.Add(runIcon);
            _debugToolbarCommands.Add(pauseIcon);
            _debugToolbarCommands.Add(stepIcon);
            _debugToolbarCommands.Add(stopIcon);
            Factory.ToolBarManager.AddGlobalItems(this, _debugToolbarCommands);
            Factory.ToolBarManager.UpdateItemEnabledStates(_debugToolbarCommands);

            _agsEditor.Debugger.DebugStateChanged += new DebugController.DebugStateChangedHandler(Debugger_DebugStateChanged);
            _agsEditor.AttemptToSaveGame          += new AGSEditor.AttemptToSaveGameHandler(_agsEditor_AttemptToSaveGame);
        }
示例#24
0
        public RoomsComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            _guiController.RegisterIcon("RoomsIcon", Resources.ResourceManager.GetIcon("room.ico"));
            _guiController.RegisterIcon(ROOM_ICON_UNLOADED, Resources.ResourceManager.GetIcon("room-item.ico"));
            _guiController.RegisterIcon(ROOM_ICON_LOADED, Resources.ResourceManager.GetIcon("roomsareas.ico"));
            _guiController.RegisterIcon("MenuIconSaveRoom", Resources.ResourceManager.GetIcon("menu_file_save-room.ico"));

            MenuCommands commands = new MenuCommands(GUIController.FILE_MENU_ID, 50);
            commands.Commands.Add(new MenuCommand(COMMAND_SAVE_ROOM, "Save Room", Keys.Control | Keys.R, "MenuIconSaveRoom"));
            _guiController.AddMenuItems(this, commands);

            _nativeProxy = Factory.NativeProxy;
            _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Rooms", "RoomsIcon");
            _guiController.OnZoomToFile += new GUIController.ZoomToFileHandler(GUIController_OnZoomToFile);
            _guiController.OnGetScript += new GUIController.GetScriptHandler(GUIController_OnGetScript);
            _guiController.OnScriptChanged += new GUIController.ScriptChangedHandler(GUIController_OnScriptChanged);
            _guiController.OnGetScriptEditorControl += new GUIController.GetScriptEditorControlHandler(_guiController_OnGetScriptEditorControl);
            _agsEditor.PreCompileGame += new AGSEditor.PreCompileGameHandler(AGSEditor_PreCompileGame);
            _agsEditor.PreSaveGame += new AGSEditor.PreSaveGameHandler(AGSEditor_PreSaveGame);
            _agsEditor.ProcessAllGameTexts += new AGSEditor.ProcessAllGameTextsHandler(AGSEditor_ProcessAllGameTexts);
            _agsEditor.PreDeleteSprite += new AGSEditor.PreDeleteSpriteHandler(AGSEditor_PreDeleteSprite);
            _modifiedChangedHandler = new Room.RoomModifiedChangedHandler(_loadedRoom_RoomModifiedChanged);
            RePopulateTreeView();
        }
示例#25
0
 public override void Destroy()
 {
     GamePullController.DestroyButton(gameObject);
     animation.Destroy();
     isStatic = false;
     GUIController.Remove(gameObject, this);
 }
	//Awake is always called before any Start functions
	void Awake()
	{
		//Check if instance already exists
		if (instance == null)
        {
            //if not, set instance to this
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
		//If instance already exists and it's not this:
		else if (instance != null)
        {
            oldInstance = instance;
            oldInstance.gameObject.SetActive(false);
            instance = this;
        }

			//Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager.
			//Destroy(gameObject);    

		//Sets this to not be destroyed when reloading scene
		

		//Get a component reference to the attached BoardManager script
		//boardScript = GetComponent<BoardManager>();

		//Call the InitGame function to initialize the first level 
		InitGame();
	}
示例#27
0
    void Start()
    {
        scrollingCamera = GameObject.FindObjectOfType <ScrollingCamera>();

        instance = this;

        canSpin = true;

        LevelSelectGUI.menuState = MenuState.TITLE;

        AmbientNoise.Play();
        ScreenFade.FadeFrom(new Color(0, 0, 0, 0));
        GUIController.DisableTexts();
        RecordingManager.enableGUI = false;

        // Change skybox based on which world is unlocked
        GetComponent <Skybox>().material = skyboxes[SaveManager.save.worldUnlocked - 1];

        if (worldToShow != "")
        {
            GameObject.Find(worldToShow).SendMessage("OnMouseDown", SendMessageOptions.DontRequireReceiver);
            GameObject.Find(worldToShow).SendMessage("OnMouseUp", SendMessageOptions.DontRequireReceiver);
            Camera.main.GetComponent <ScrollingCamera>().FinishImmediate();
            RotateToLevel(levelToShow);

            if (worldTransition)
            {
                worldTransition = false;
                StartCoroutine("WorldTransition");
            }
        }
    }
示例#28
0
    // Use this for initialization
    void Awake()
    {
        gameState    = GameStates.PLAYER_TURN;
        dummy_target = GameObject.Find("DummyTarget");

        // Setting up cameras: main and Cinematic
        cameraMain = GameObject.Find("camera_main");
        cameraMain.camera.enabled      = true;
        cameraCinematic                = GameObject.Find("camera_cinematic");
        cameraCinematic.camera.enabled = false;

        // Getting references to GUI and Input
        inputController = GameObject.Find("game_controller").GetComponent <InputController>();
        guiController   = GameObject.Find("camera_main").GetComponent <GUIController>();

        // Initializng player characters
        playerCharList    = new GameObject[2];
        playerCharList[0] = Instantiate(spawnObject, new Vector3(-7.5f, 0f, 1.5f), Quaternion.identity) as GameObject;
        playerCharList[0].GetComponent <CharModel>().CharacterSetup("Raven", 90, (Texture2D)Resources.Load("Textures/Raven", typeof(Texture2D)), new Vector3(-7.5f, 0f, 1.5f));
        playerCharList[1] = Instantiate(spawnObject, new Vector3(-7.5f, 0f, 0.5f), Quaternion.identity) as GameObject;
        playerCharList[1].GetComponent <CharModel>().CharacterSetup("Raider", 88, (Texture2D)Resources.Load("Textures/raider", typeof(Texture2D)), new Vector3(-7.5f, 0f, 0.5f));
        for (int i = 0; i <= 1; i++)
        {
            GameObject g = Instantiate(weapon) as GameObject;
            //Debug.Log(g.transform);
            playerCharList[i].GetComponent <CharModel>().AddItemInventory(g, 0);
            //playerCharList[i].transform.parent = playerCharList[i].transform.FindChild("char_robotGuard_RightHand");
            //playerCharList[i].transform.localPosition = new Vector3 (0.1f, 0.021f, -0.02f);
        }
    }
示例#29
0
        public PluginsComponent(GUIController guiController, AGSEditor agsEditor, AGSEditorController pluginEditorController)
            : base(guiController, agsEditor)
        {
            _pluginEditorController = pluginEditorController;

            foreach (string fullFileName in Utilities.GetDirectoryFileList(_agsEditor.EditorDirectory, PLUGIN_SEARCH_MASK))
            {
                string fileName = Path.GetFileName(fullFileName).ToLower();
                // Don't process our editor .net dlls
                if (!fileName.StartsWith("ags."))
                {
                    LoadRuntimePluginIntoMemory(fileName);
                }
                else if (fileName.StartsWith("ags.plugin."))
                {
                    LoadEditorPluginIntoMemory(fileName);
                }
            }

            _guiController.RegisterIcon("PluginIcon", Resources.ResourceManager.GetIcon("plugin.ico"));
            _guiController.RegisterIcon("PluginDisabledIcon", Resources.ResourceManager.GetIcon("pluginDisabled.ico"));
            _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Plugins", "PluginIcon");
            RepopulateTreeView();

            _agsEditor.GetScriptHeaderList += new GetScriptHeaderListHandler(AGSEditor_GetScriptHeaderList);
            _agsEditor.Tasks.GetFilesForInclusionInTemplate += new Tasks.GetFilesForInclusionInTemplateHandler(AGSEditor_GetFilesForInclusionInTemplate);
            _agsEditor.Tasks.NewGameFilesExtracted          += new Tasks.NewGameFilesExtractedHandler(AGSEditor_NewGameFilesExtracted);
            Factory.Events.GetAboutDialogText += new EditorEvents.GetAboutDialogTextHandler(Events_GetAboutDialogText);
        }
示例#30
0
    private void ShowLevelDetails(string lvlName)
    {
        SelectedLevel = LevelContainer.GetInstance().Levels[lvlName];
        var lvlDetails = GUIController.GetInstance().Screens[Screen.ScreenType.LevelDetails];

        Screen.GoTo(lvlDetails);
    }
示例#31
0
        public ApplicationController()
        {
            _events                 = Factory.Events;
            _agsEditor              = Factory.AGSEditor;
            _guiController          = Factory.GUIController;
            _componentController    = Factory.ComponentController;
            _nativeProxy            = Factory.NativeProxy;
            _pluginEditorController = new AGSEditorController(_componentController, _agsEditor, _guiController);

            _events.GameLoad                     += new EditorEvents.GameLoadHandler(_events_GameLoad);
            _events.GamePostLoad                 += new EditorEvents.GamePostLoadHandler(_events_GamePostLoad);
            _events.GameSettingsChanged          += new EditorEvents.ParameterlessDelegate(_events_GameSettingsChanged);
            _events.ImportedOldGame              += new EditorEvents.ParameterlessDelegate(_events_ImportedOldGame);
            _events.RefreshAllComponentsFromGame += new EditorEvents.ParameterlessDelegate(_events_RefreshAllComponentsFromGame);
            _events.SavingGame                   += new EditorEvents.SavingGameHandler(_events_SavingGame);
            _events.SavingUserData               += new EditorEvents.SavingUserDataHandler(_events_SavingUserData);
            _events.LoadedUserData               += new EditorEvents.LoadedUserDataHandler(_events_LoadedUserData);
            _agsEditor.PreSaveGame               += new AGSEditor.PreSaveGameHandler(_agsEditor_PreSaveGame);

            _guiController.OnEditorShutdown += new GUIController.EditorShutdownHandler(GUIController_OnEditorShutdown);
            _guiController.Initialize(_agsEditor);
            _agsEditor.DoEditorInitialization();
            AGSColor.ColorMapper = new ColorMapper(_agsEditor);
            CreateComponents();
        }
示例#32
0
        public static Label Create(XmlReader reader, IWidget parent = null)
        {
            Label label = new Label();

            label.ReadElement(reader, parent);
            label.SetParent(parent);

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element)
                {
                    if (reader.Name == "Text")
                    {
                        label.Text = reader.ReadElementContentAsString();
                    }
                    else
                    {
                        XmlReader subReader = reader.ReadSubtree();
                        GUIController.ReadElement(subReader, label);
                        subReader.Close();
                    }
                }
            }


            return(label);
        }
示例#33
0
 public PaletteComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     Init();
     _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("iconpal.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Colours", ICON_KEY);
 }
示例#34
0
 public SpeechComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _agsEditor.ExtraCompilationStep     += new AGSEditor.ExtraCompilationStepHandler(_agsEditor_ExtraCompilationStep);
     _agsEditor.ExtraOutputCreationStep  += new AGSEditor.ExtraOutputCreationStepHandler(_agsEditor_ExtraOutputCreationStep);
     _agsEditor.GetSourceControlFileList += new GetSourceControlFileListHandler(_agsEditor_GetSourceControlFileList);
 }
示例#35
0
	void Awake()
	{
		instance = this;

		stomacButton.OnButtonDown += () => {
			IsInvocation = false;
			OnButtonDownStomac();
		};
		treaningButton.OnButtonDown += () => {
			IsInvocation = false;
			OnButtonDownTreaning();
		};
		preachingButton.OnButtonDown += () => {
			IsInvocation = false;
			OnButtonDownPreaching();
		};

		stomacButton.OnCoolFinish += () => {
			IsInvocation = true;
			OnCoolFinish();
		};
		treaningButton.OnCoolFinish += () => {
			IsInvocation = true;
			OnCoolFinish();
		};
		preachingButton.OnCoolFinish += () => {
			IsInvocation = true;
			OnCoolFinish();
		};

		IsInvocation = true;
	}
示例#36
0
        public HelpCommandsComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            _guiController.RegisterIcon("MenuIconAbout", Resources.ResourceManager.GetIcon("menu_help_about-ags.ico"));
            _guiController.RegisterIcon("MenuIconHelpContents", Resources.ResourceManager.GetIcon("menu_help_content.ico"));
            _guiController.RegisterIcon("MenuIconDynamicHelp", Resources.ResourceManager.GetIcon("menu_help_dynamic-help.ico"));
            _guiController.RegisterIcon("MenuIconHelpIndex", Resources.ResourceManager.GetIcon("menu_help_index.ico"));
            _guiController.RegisterIcon("MenuIconCheckForUpdate", Resources.ResourceManager.GetIcon("menu_help_update.ico"));
            _guiController.RegisterIcon("MenuIconVisitForums", Resources.ResourceManager.GetIcon("menu_help_visit-forums.ico"));
            _guiController.RegisterIcon("MenuIconVisitWebsite", Resources.ResourceManager.GetIcon("menu_help_visit-site.ico"));

            _guiController.AddMenu(this, GUIController.HELP_MENU_ID, "&Help");

            _guiController.OnLaunchHelp += new GUIController.LaunchHelpHandler(_guiController_OnLaunchHelp);

            MenuCommands commands = new MenuCommands(GUIController.HELP_MENU_ID, null);
            commands.Commands.Add(new MenuCommand(LAUNCH_HELP_COMMAND, "&Dynamic Help", Keys.F1, "MenuIconDynamicHelp"));
            commands.Commands.Add(new MenuCommand(HELP_CONTENTS_COMMAND, "&Contents", "MenuIconHelpContents"));
            commands.Commands.Add(new MenuCommand(HELP_INDEX_COMMAND, "&Index", "MenuIconHelpIndex"));
            commands.Commands.Add(MenuCommand.Separator);
            commands.Commands.Add(new MenuCommand(VISIT_AGS_WEBSITE, "Visit the AGS &Website", "MenuIconVisitWebsite"));
            commands.Commands.Add(new MenuCommand(VISIT_AGS_FORUMS, "Visit the AGS &Forums", "MenuIconVisitForums"));
            commands.Commands.Add(MenuCommand.Separator);
            commands.Commands.Add(new MenuCommand(CHECK_FOR_UPDATES, "Chec&k for Updates", "MenuIconCheckForUpdate"));
            _guiController.AddMenuItems(this, commands);

            commands = new MenuCommands(GUIController.HELP_MENU_ID, 1000);
            #if DEBUG
            commands.Commands.Add(new MenuCommand(CRASH_EDITOR_COMMAND, "Crash editor DEBUG ONLY"));
            #endif
            commands.Commands.Add(new MenuCommand(ABOUT_AGS_COMMAND, "&About AGS...", "MenuIconAbout"));
            _guiController.AddMenuItems(this, commands);

            _helpFileName = Path.Combine(_agsEditor.EditorDirectory, "ags-help.chm");
        }
示例#37
0
    public void ButtonPressed()
    {
        if (animating)
        {
            return;
        }

        Debug.Log("pausing");

        var currentState = MainGUI.GetCurrentAnimatorStateInfo(0);

        if (GUIController.LevelStarted && !LevelState.Dead && !LevelState.HasFinished && !GameRecorder.playingBack)
        {
            if (Time.timeScale > 0.0f && !paused && currentState.IsName("Unpaused"))
            {
                Time.timeScale = 1.0f - Time.timeScale;
                GUIController.GUILevelPause();
                paused           = true;
                sharedUI.enabled = true;
                //animating = true;
                //MainMenuController.PlayAnimation(MainGUI, "PauseAnim", false, () => { animating = false; });
                MainGUI.Play("Pause");
            }
            else if (paused && currentState.IsName("Pause"))
            {
                Time.timeScale = 1.0f - Time.timeScale;
                GUIController.GUILevelPlay();
                paused           = false;
                sharedUI.enabled = false;
                //animating = true;
                //MainMenuController.PlayAnimation(MainGUI, "PauseAnim", true, () => { animating = false; });
                MainGUI.Play("Unpause");
            }
        }
    }
示例#38
0
 public GUIText()
 {
     gameObject = GamePullController.CreateText();
     OnLanguageChange();
     GUIController.Add(this);
     isClickable = false;
 }
        public static void __TestGrabber__(bool debug = false){

            InformationGrabber grabber = new InformationGrabber();

            GUIController.LogOutput(grabber.SearchForTerm("tennis", debug));

        }
示例#40
0
    public void UpdateElement(Action action, GUIController guiController)
    {
        RenderStats(action);

        actionText.text    = action.actionName;
        healthText.text    = Mathf.Abs(action.GetDamageAmount()) + "";
        energyText.text    = action.GetEnergyCost() + "";
        hitChanceText.text = (int)(action.GetHitChance() * 100) + "%";

        if (action.HasLastingStatusEffect())
        {
            healthText.text   = healthText.text + "+" + action.statusEffect.effectValue;
            numTurnsText.text = "x" + action.statusEffect.numTurns;
        }

        //Set the colors of the text meshes based on their buff values
        SetStatTextColor(healthText, action.DamageBuffValue(), guiController);
        SetStatTextColor(energyText, action.EnergyCostBuffValue(), guiController);
        SetStatTextColor(hitChanceText, action.HitChanceBuffValue(), guiController);

        if (action.actionImage != null)
        {
            actionImage.sprite = action.actionImage;
        }
        else
        {
            actionImage.sprite = Resources.Load <Sprite>("x");
        }


        UpdatePosition();
    }
示例#41
0
        public Modbase(ModContentPack content) : base(content)
        {
            Settings = GetSettings <Settings>();

            ThreadSafeLogger.Message($"[Analyzer] Loaded version {analyzerVersion.Major}.{analyzerVersion.Minor}.{analyzerVersion.Build} rev {analyzerVersion.Revision}");


            { // Profiling
                ModInfoCache.PopulateCache(Content.Name);

                GUIController.InitialiseTabs();

                // GUI needs to be initialised before xml (the tabs need to exist for entries to be inserted into them)
                XmlParser.CollectXmlData();
            }

            { // Always Running
                StaticHarmony.Patch(AccessTools.Method(typeof(GlobalControlsUtility), nameof(GlobalControlsUtility.DoTimespeedControls)),
                                    prefix: new HarmonyMethod(typeof(GUIElement_TPS), nameof(GUIElement_TPS.Prefix)));
            }

            { // Performance Patches
                PerformancePatches.InitialisePatches();
            }

#if DEBUG
            ThreadSafeLogger.Warning("==========================================================================");
            ThreadSafeLogger.Warning("                          Analyzer Running In Debug Mode                  ");
            ThreadSafeLogger.Warning("==========================================================================");
#endif
        }
示例#42
0
 public SettingsComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _settingsPane = new GeneralSettings();
     _document = new ContentDocument(_settingsPane, "General Settings", this);
     _guiController.RegisterIcon("SettingsIcon", Resources.ResourceManager.GetIcon("iconsett.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, "GeneralSettings", "General Settings", "SettingsIcon");
 }
 void OnDestroy()
 {
     if(oldInstance != null)
     {
         instance = oldInstance;
         instance.gameObject.SetActive(true);
     }
 }
示例#44
0
 public PaletteComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _palEditor = new PaletteEditor();
     RecreateDocument();
     _guiController.RegisterIcon("PaletteIcon", Resources.ResourceManager.GetIcon("iconpal.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Colours", "PaletteIcon");
 }
示例#45
0
        public BuildCommandsComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            ScriptEditor.AttemptToEditScript += new ScriptEditor.AttemptToEditScriptHandler(ScriptEditor_AttemptToEditScript);
            _guiController.QueryEditorShutdown += new GUIController.QueryEditorShutdownHandler(guiController_QueryEditorShutdown);
            _guiController.InteractiveTasks.TestGameStarting += new InteractiveTasks.TestGameStartingHandler(AGSEditor_TestGameStarting);
            _guiController.InteractiveTasks.TestGameFinished += new InteractiveTasks.TestGameFinishedHandler(AGSEditor_TestGameFinished);
            _guiController.RegisterIcon("BuildIcon", Resources.ResourceManager.GetIcon("build.ico"));
            _guiController.RegisterIcon("RunIcon", Resources.ResourceManager.GetIcon("run.ico"));
            _guiController.RegisterIcon("StepIcon", Resources.ResourceManager.GetIcon("step.ico"));
            _guiController.RegisterIcon("StopIcon", Resources.ResourceManager.GetIcon("stop.ico"));
            _guiController.RegisterIcon("PauseIcon", Resources.ResourceManager.GetIcon("pause.ico"));
            _guiController.RegisterIcon("RunMenuIcon", Resources.ResourceManager.GetIcon("menu_build_run.ico"));
            _guiController.RegisterIcon("StepMenuIcon", Resources.ResourceManager.GetIcon("menu_build_step-into.ico"));
            _guiController.RegisterIcon("StopMenuIcon", Resources.ResourceManager.GetIcon("menu_build_stop.ico"));
            _guiController.RegisterIcon("PauseMenuIcon", Resources.ResourceManager.GetIcon("menu_build_pause.ico"));
            _guiController.RegisterIcon("RebuildAllMenuIcon", Resources.ResourceManager.GetIcon("menu_build_rebuild-files.ico"));
            _guiController.RegisterIcon("SetupGameMenuIcon", Resources.ResourceManager.GetIcon("menu_build_gamesetup.ico"));

            _guiController.RegisterIcon("MenuIconBuildEXE", Resources.ResourceManager.GetIcon("menu_file_built-exe.ico"));
            _guiController.RegisterIcon("MenuIconTest", Resources.ResourceManager.GetIcon("menu_build_runwithout.ico"));

            _guiController.AddMenu(this, DEBUG_MENU_ID, "&Build");
            MenuCommands debugCommands = new MenuCommands(DEBUG_MENU_ID, GUIController.FILE_MENU_ID);
            debugCommands.Commands.Add(new MenuCommand(RUN_COMMAND, "&Run", Keys.F5, "RunMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(TEST_GAME_COMMAND, "Run without &debugger", Keys.Control | Keys.F5, "MenuIconTest"));
            debugCommands.Commands.Add(new MenuCommand(STEP_INTO_COMMAND, "S&tep into", Keys.F11, "StepMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(PAUSE_COMMAND, "&Pause", "PauseMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(STOP_COMMAND, "&Stop", "StopMenuIcon"));
            debugCommands.Commands.Add(MenuCommand.Separator);
            debugCommands.Commands.Add(new MenuCommand(COMPILE_GAME_COMMAND, "&Build EXE", Keys.F7, "MenuIconBuildEXE"));
            debugCommands.Commands.Add(new MenuCommand(REBUILD_GAME_COMMAND, "Rebuild &all files", "RebuildAllMenuIcon"));
            debugCommands.Commands.Add(new MenuCommand(SETUP_GAME_COMMAND, "Run game setu&p...", "SetupGameMenuIcon"));
            _guiController.AddMenuItems(this, debugCommands);

            _guiController.SetMenuItemEnabled(this, STEP_INTO_COMMAND, false);
            _guiController.SetMenuItemEnabled(this, PAUSE_COMMAND, false);
            _guiController.SetMenuItemEnabled(this, STOP_COMMAND, false);

            MenuCommand buildIcon = new MenuCommand(COMPILE_GAME_COMMAND, "Build game EXE (F7)", "BuildIcon");
            MenuCommand runIcon = new MenuCommand(RUN_COMMAND, "Run (F5)", "RunIcon");
            MenuCommand stopIcon = new MenuCommand(STOP_COMMAND, "Stop", "StopIcon");
            MenuCommand stepIcon = new MenuCommand(STEP_INTO_COMMAND, "Step into (F11)", "StepIcon");
            MenuCommand pauseIcon = new MenuCommand(PAUSE_COMMAND, "Pause", "PauseIcon");
            stepIcon.Enabled = false;
            stopIcon.Enabled = false;
            pauseIcon.Enabled = false;
            _debugToolbarCommands.Add(buildIcon);
            _debugToolbarCommands.Add(runIcon);
            _debugToolbarCommands.Add(pauseIcon);
            _debugToolbarCommands.Add(stepIcon);
            _debugToolbarCommands.Add(stopIcon);
            Factory.ToolBarManager.AddGlobalItems(this, _debugToolbarCommands);
            Factory.ToolBarManager.UpdateItemEnabledStates(_debugToolbarCommands);

            _agsEditor.Debugger.DebugStateChanged += new DebugController.DebugStateChangedHandler(Debugger_DebugStateChanged);
            _agsEditor.AttemptToSaveGame += new AGSEditor.AttemptToSaveGameHandler(_agsEditor_AttemptToSaveGame);
        }
示例#46
0
 public CursorsComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _documents = new Dictionary<MouseCursor, ContentDocument>();
     _guiController.RegisterIcon("CursorsIcon", Resources.ResourceManager.GetIcon("cursor.ico"));
     _guiController.RegisterIcon("CursorIcon", Resources.ResourceManager.GetIcon("cursor-item.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Mouse cursors", "CursorsIcon");
     RePopulateTreeView();
 }
 public StatisticsSenderComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     // Screen width x height must be cached here, otherwise we could attempt to
     // retrieve them while the game is being tested full-screen
     _screenWidth = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width;
     _screenHeight = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height;
     _timer = new Timer(new TimerCallback(timer_Callback), null, 120000, 240000);
 }
示例#48
0
 public InventoryComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _documents = new Dictionary<InventoryItem, ContentDocument>();
     _guiController.RegisterIcon("InventoryIcon", Resources.ResourceManager.GetIcon("iconinv-item.ico"));
     _guiController.RegisterIcon("InventorysIcon", Resources.ResourceManager.GetIcon("iconinv.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Inventory items", "InventorysIcon");
     RePopulateTreeView();
 }
	public static GUIController GetInstance()
	{
		if(instance == null)
		{
			instance = new GUIController();
		}

		return instance;
	}
示例#50
0
    void Start()
    {
        if (bullet == null)
        {
            bullet = Resources.Load("Prefabs/BulletWood") as GameObject;
        }

        gCntrl = GameObject.Find("GUI").GetComponent("GUIController") as GUIController;
    }
示例#51
0
 public FontsComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _documents = new Dictionary<AGS.Types.Font, ContentDocument>();
     _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("font.ico"));
     _guiController.RegisterIcon("FontIcon", Resources.ResourceManager.GetIcon("font-item.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Fonts", ICON_KEY);
     RePopulateTreeView();
 }
示例#52
0
 public SpriteManagerComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     Init();
     _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("iconspr.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Sprites", ICON_KEY);
     Factory.Events.ShowSpriteManager += new EditorEvents.ShowSpriteManagerHandler(Events_ShowSpriteManager);
     RefreshDataFromGame();
 }
示例#53
0
    // Use this for initialization
    void Start()
    {
        playerController = (PlayerController) GameObject.FindGameObjectWithTag("Player").
            GetComponent(typeof(PlayerController));
        guiController = GameObject.Find("GUI").GetComponentInChildren<GUIController>();

        oxygens = new GameObject[MAX_OXYGENS];

        neededElement = 0;
    }
示例#54
0
 public SpriteManagerComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _sprEditor = new SpriteManager();
     _editorPane = new ContentDocument(_sprEditor, "Sprites", this);
     _guiController.RegisterIcon("SpriteManagerIcon", Resources.ResourceManager.GetIcon("iconspr.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Sprites", "SpriteManagerIcon");
     Factory.Events.ShowSpriteManager += new EditorEvents.ShowSpriteManagerHandler(Events_ShowSpriteManager);
     RefreshDataFromGame();
 }
示例#55
0
    private void OnEnable()
    {
        guiController = GetComponentInParent<GUIController>();
        guiScreen = GetComponent<GUIScreen>();

        var inGame = !!SpaceTraderConfig.LocalPlayer;

        guiScreen.ShowHeader = inGame;
        headerImage.gameObject.SetActive(!inGame);
    }
示例#56
0
 void Awake()
 {
     if (instance == null){
         instance = this;
         eqUV = Vector2.zero;
         eqOffset = Vector2.one;
         eqOffsetX = 1;
         this.StartSafeCoroutine(scrollEQUVs());
     }
 }
示例#57
0
        public WelcomeComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            _welcomePane = new WelcomePane(guiController);
            _document = new ContentDocument(_welcomePane, "Start Page", this, ICON_KEY);

            _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("menu_help_showstart.ico"));

            _menuCommands.Commands.Add(new MenuCommand(SHOW_START_PAGE_COMMAND, "Show Start Page", ICON_KEY));
            _guiController.AddMenuItems(this, _menuCommands);
        }
示例#58
0
 public DialogsComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _documents = new Dictionary<Dialog, ContentDocument>();
     _guiController.RegisterIcon("DialogsIcon", Resources.ResourceManager.GetIcon("dialog.ico"));
     _guiController.RegisterIcon("DialogIcon", Resources.ResourceManager.GetIcon("dialog-item.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Dialogs", "DialogsIcon");
     _guiController.OnZoomToFile += new GUIController.ZoomToFileHandler(GUIController_OnZoomToFile);
     _guiController.OnGetScriptEditorControl += new GUIController.GetScriptEditorControlHandler(_guiController_OnGetScriptEditorControl);
     RePopulateTreeView();
 }
示例#59
0
	/**
	 * The Start method is called automatically by Monobehaviors,
	 * essentially becoming the constructor of the class.
	 * <p>
	 * See <a href="http://docs.unity3d.com/ScriptReference/MonoBehaviour.Start.html">docs.unity3d.com</a> for more information.
	 */
	private void Start() {
		bobTimer = 0.0f;
		player = GetComponent<Player> ();
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;
		equipment = GameObject.Find("Equipment").GetComponent<Equipment>();
        viewmodel = null;

        guiController = GameObject.Find("Graphical User Interface").GetComponent<GUIController>();
        audioSource = GetComponent<AudioSource>();
    }
示例#60
0
 //LayerMask mask = (1<<LayerMask.NameToLayer("Ground") | 1<<LayerMask.NameToLayer("Characters"));
 public UIGameHUD(GUIController GUI, MainGame mg)
 {
     this.gui = GUI;
     MainGameInstance = mg;
     board = Grid_Setup.Instance;
     panel = GameObject.Instantiate(gui.panelFab.gameObject, Vector3.zero, Quaternion.identity)as GameObject;
     panel.transform.SetParent(gui.UIcan.transform,false);
     panel.transform.SetAsLastSibling();
     pc = panel.GetComponent<PanelController> ();
     pc.HidePanel();
 }