Exemplo n.º 1
0
        internal static void ShowHtmlTags(Form form)
        {
            CharSelect specialCharsWindow = new CharSelect {
                Owner = form
            };

            specialCharsWindow.InitializeForm(CharSelect.CharType.Html);
            specialCharsWindow.Show(form);
        }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     incDialog     = 0;
     DialogChecker = true;
     quest         = Quest.instance;
     charSelect    = UnityEngine.GameObject.FindObjectOfType <CharSelect>();
     Speaker.text  = Message[quest.currentQuest].Dialog.messenger[incDialog];
     Content.text  = Message[quest.currentQuest].Dialog.message[incDialog];
 }
Exemplo n.º 3
0
        internal static void ShowSpecialChars(Form form)
        {
            CharSelect specialCharsWindow = new CharSelect {
                Owner = form
            };

            specialCharsWindow.InitializeForm(CharSelect.CharType.Standard);
            specialCharsWindow.Show(form);
        }
Exemplo n.º 4
0
    public void OnCLick()
    {
        Storage storage = GameObject.FindObjectOfType <Storage>();

        if (storage != null)
        {
            storage.selectedCharIndex = x;
            CharSelect charSelect = GameObject.FindObjectOfType <CharSelect>();
            charSelect.OnClick_ToCharPane();
        }
    }
Exemplo n.º 5
0
 public void instantiateCharacter()
 {
     charSelect = UnityEngine.GameObject.FindObjectOfType <CharSelect>();
     if (charSelect.Charenum == choices.Kazu)
     {
         ChPlayer = Instantiate(CharacterPrefab[0], Positions[0].position, Positions[0].rotation);
     }
     else if (charSelect.Charenum == choices.sophia)
     {
         ChPlayer = Instantiate(CharacterPrefab[1], Positions[0].position, Positions[0].rotation);
     }
 }
Exemplo n.º 6
0
    private void Awake()
    {
        if (data.Character.Length <= 0)
        {
            return;
        }

        foreach (GameData.Char c in data.Character)
        {
            CharSelect cs = Instantiate(charSelect, transform).GetComponent <CharSelect>();
            cs.character = c;
        }
    }
Exemplo n.º 7
0
 public void CharInstantiate()
 {
     charSelect = UnityEngine.GameObject.FindObjectOfType <CharSelect>();
     if (charSelect.Charenum == choices.Kazu)
     {
         Character      = Instantiate(CharacterPrefabs[0], Positions.transform.position, Positions.transform.rotation);
         Character.name = "Kazu";
         Character.tag  = "Player";
     }
     if (charSelect.Charenum == choices.sophia)
     {
         Character      = Instantiate(CharacterPrefabs[1], Positions.transform.position, Positions.transform.rotation);
         Character.name = "Sophia";
         Character.tag  = "Player";
     }
     Character.transform.position = new Vector3(Positions.transform.position.x, Positions.transform.position.y, Positions.transform.position.z);
 }
Exemplo n.º 8
0
    public static void Update(int ms, Microsoft.Xna.Framework.Input.KeyboardState ks, GamePadState[] gs)
    {
        SlimDX.DirectInput.JoystickState[] joyStates = ControllerManager.GetState();

        for (int i = 0; i != 4; i++)
        {
            if (Inputs[i] is KeyboardInput)
            {
                ((KeyboardInput)Inputs[i]).Update(ks);
            }
        }

        State newState;

        switch (GState)
        {
        case State.Title:
            newState = Title.Update(ms, ks);
            if (newState == State.CharSelect)
            {
                GState     = State.CharSelect;
                CharSelect = new CharSelect();
            }
            break;

        case State.CharSelect:

            newState = CharSelect.Update(ms);
            if (newState == State.InGame)
            {
                GState = State.InGame;
                InGame = new InGame(CharSelect.CharacterSelect);
            }
            break;


        case State.InGame:

            newState = InGame.Update(ms);
            if (newState == State.Title)
            {
            }
            break;
        }
    }
Exemplo n.º 9
0
        /// <summary>
        /// EventHandler method for the ISXEVE_onFrame LS event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void HandleEveFrame(object sender, LSEventArgs e)
        {
            using (new FrameLock(true))
            {
                //Instance.LogMessage("HandleEveFrame", LogSeverityTypes.Debug, "Beginning frame handler.");

                //Reset the exitResetEvent. We should not attempt to dispose right now.
                _exitResetEvent.Reset();

                //If paused, stop the runtime timer.
                if (!IsEnabled)
                {
                    RunTime.Stop();
                }

                //If doing cleanup go ahead and and do cleanup.
                if (_isDoingInFrameCleanup)
                {
                    //Have ModuleManager do inframe cleanup and set the event
                    //ModuleManager.InFrameCleanup();

                    _isDoingInFrameCleanup = false;
                    _InFrameCleanupResetEvent.Set();
                }

                //If not paused and it's been enough time to pulse again...
                if (Instance.IsEnabled && DateTime.Now.CompareTo(NextPulse) >= 0)
                {
                    //Make sure the runtime timer is running.
                    RunTime.Start();

                    //Now, if it's not been enough pulses to fire the pulse...
                    if (!Instance.ShouldPulse())
                    {
                        //Set the reset event and return.
                        EndPulse();
                        return;
                    }

                    var methodName = "HandleEveFrame";

                    //Set the time of this pulse
                    TimeOfPulse = DateTime.Now;
                    //Increment the pulse count
                    Pulses++;
                    //Core.StealthBot.Logging.LogMessage(Instance.ObjectName, new LogEventArgs(LogSeverityTypes.Debug,
                    //	"HandleEveFrame", String.Format("Pulse check: {0}", Pulses)));

                    #region ISXEVE IsSafe Check

                    //If ISXEve is reporting unsafe, just abort and return. It means
                    //it's not safe to continue logic checks with ISXEVE.
                    if (!_isxeveProvider.Isxeve.IsSafe)
                    {
                        //Logging.LogMessage(Instance.ObjectName, new LogEventArgs(LogSeverityTypes.Debug,
                        //methodName, "Error: ISXEVE reporting not safe. Aborting pulse."));
                        EndPulse();
                        return;
                    }

                    #endregion

                    #region ISXEVE Detection

                    if (!_isxeveProvider.Isxeve.IsReady)
                    {
                        Instance.LogMessage(methodName, LogSeverityTypes.Debug, "ISXEVE is not ready, pausing.");
                        Instance.IsEnabled = false;
                        EndPulse();
                        return;
                    }

                    #endregion

                    #region Me Validity Check

                    //Another check - ME validity
                    if (!MeCache.CheckValidity())
                    {
                        //Logging.LogMessage(Instance.ObjectName, new LogEventArgs(LogSeverityTypes.Debug,
                        //methodName, "Error: InSpace and InStation both false or Me invalid."));

                        if (LavishScriptObject.IsNullOrInvalid(MeCache.Me))
                        {
                            #region Login Screen Detection

                            var login = new Login();
                            if (!LavishScriptObject.IsNullOrInvalid(login))
                            {
                                if (ConfigurationManager.ActiveConfigProfile != null)
                                {
                                    Instance.LogMessage(methodName, LogSeverityTypes.Standard,
                                                        "Login screen detected. Exiting, relaunching if enabled.");
                                    Instance.ExitAndRelaunch();
                                }
                                else
                                {
                                    Instance.LogMessage(methodName, LogSeverityTypes.Standard,
                                                        "Login screen detected. Please close StealthBot, restart EVE, and start StealthBot while fully logged in.");
                                }
                                Instance.IsEnabled = false;
                            }

                            #endregion

                            #region CharSelect Screen Detection

                            var charSelect = new CharSelect();
                            if (!LavishScriptObject.IsNullOrInvalid(charSelect))
                            {
                                Instance.LogMessage(methodName, LogSeverityTypes.Standard,
                                                    "Character Select screen detected. Please close StealthBot, restart EVE, and start StealthBot while fully logged in.");
                                Instance.IsEnabled = false;
                            }

                            #endregion
                        }

                        _exitResetEvent.Set();
                        Logging.LogMessage("StealthBot", methodName, LogSeverityTypes.Debug, "Aborting pulse due to invalidity.");
                        NextPulse = DateTime.Now.AddSeconds(PULSE_FREQUENCY);
                        return;
                    }

                    #endregion

                    //Pulse the ModuleManager.
                    ModuleManager.Pulse();

                    //Fire off the OnPulse event to let the UI know of any changes
                    try
                    {
                        //Instance.LogMessage("HandleEveFrame", LogSeverityTypes.Debug, "Beginning OnPulse.");
                        //Instance.StartMethodProfiling("OnPulse");
                        OnPulse(sender, e);
                        //Instance.EndMethodProfiling();
                        //Instance.LogMessage("HandleEveFrame", LogSeverityTypes.Debug, "Ending OnPulse.");
                    }
                    catch (Exception ex)
                    {
                        LogException(ex, methodName, "Caught excpetion while firing OnPulse event:");
                    }

                    EndPulse();
                }

                //We're done; set the reset event so we can dispose if necessary.
                _exitResetEvent.Set();
                //Instance.LogMessage("HandleEveFrame", LogSeverityTypes.Debug, "Ending EVE Frame.");
            }
        }
Exemplo n.º 10
0
    public static void Update(int ms, Microsoft.Xna.Framework.Input.KeyboardState ks, GamePadState[] gs)
    {
        SlimDX.DirectInput.JoystickState[] joyStates = ControllerManager.GetState();

        for (int i = 0; i != 4; i++)
        {
            if (Inputs[i] is KeyboardInput)
                ((KeyboardInput)Inputs[i]).Update(ks);
        }

        State newState;
        switch (GState)
        {
            case State.Title:
                newState = Title.Update(ms,ks);
                if (newState == State.CharSelect)
                {
                    GState = State.CharSelect;
                    CharSelect = new CharSelect();
                }
                break;

            case State.CharSelect:

                newState = CharSelect.Update(ms);
               if (newState == State.InGame)
               {
                    GState = State.InGame;
                    InGame = new InGame(CharSelect.CharacterSelect);
               }
                break;

            case State.InGame:

                newState = InGame.Update(ms);
                if (newState == State.Title)
                {
                }
                break;
        }
    }
Exemplo n.º 11
0
 void Start()
 {
     animator   = GetComponent <Animator>();
     charSelect = UnityEngine.GameObject.FindObjectOfType <CharSelect>();
     toSophia   = toKazu = false;
 }