示例#1
0
    protected void Start()
    {
        bool wasUnderway = (PlayerPrefs.GetInt(showUnderwayKey, 0) == 1);

        if (wasUnderway)
        {
            ModeName prevMode = (ModeName)PlayerPrefs.GetInt(oldModeKey);
            if (prevMode == ModeName.ACTOR)
            {
                actorecoveryResumeLightbox.Open();
                Actor previousActor = (Actor)PlayerPrefs.GetInt(lastActorKey, -1);

                if (Variables.Instance.language == Language.ENGLISH)
                {
                    previousActorText.text = EnumDisplayNamesEnglish.ActorName(previousActor);
                }
                else
                {
                    previousActorText.text = EnumDisplayNamesMandarin.ActorName(previousActor);
                }
            }
            else
            {
                recoveryResumeLightbox.Open();
            }
        }
    }
示例#2
0
        private void Lunch(ModeName mode = ModeName.Multi)
        {
            var cams = new UnityEngine.Camera[2];

            switch (mode)
            {
            case ModeName.Arcade:
            case ModeName.VsCom:
            case ModeName.Practice:
                cameraManager            = new SoloCameraManager();
                cams[0]                  = Instantiate(cameras[0]);
                cams[0].transform.parent = transform;
                cams[0].rect             = new Rect(0, 0, 1, 1);
                break;

            case ModeName.Multi:
                cameraManager            = new VSPlayerCameraManager();
                cams[0]                  = Instantiate(cameras[0]);
                cams[0].transform.parent = transform;
                cams[1]                  = Instantiate(cameras[1]);
                cams[1].transform.parent = transform;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            cameraManager.Init(cams);
        }
 public MbtaRoutePrediction(string routeId, string routeName, string stopId, string stopName, ModeName mode, PredictedRoute predictions)
 {
     RouteId = routeId;
     RouteName = routeName;
     StopId = stopId;
     StopName = stopName;
     Mode = mode;
     Predictions = new ObservableCollection<MbtaPrediction> (GeneratePrediction (predictions).ToList ());
     NextPrediction = Predictions.First ();
 }
示例#4
0
 private Mode GetModeByName(ModeName modeName)
 {
     foreach (Mode m in possibleModes)
     {
         if (m.ModeName == modeName)
         {
             return(m);
         }
     }
     return(null);
 }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = Type.GetHashCode();
         hashCode = (hashCode * 397) ^ CipherName.ToLowerInvariant().GetHashCode();
         hashCode = (hashCode * 397) ^ KeySizeBits;
         hashCode = (hashCode * 397) ^ (InitialisationVector != null ? InitialisationVector.GetHashCodeExt() : 0);
         hashCode = (hashCode * 397) ^ (ModeName != null ? ModeName.ToLowerInvariant().GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BlockSizeBits != null ? BlockSizeBits.Value : 0);
         hashCode = (hashCode * 397) ^ (PaddingName != null ? PaddingName.ToLowerInvariant().GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#6
0
    public void SetMode(ModeName modeName)
    {
        Mode newMode = GetModeByName(modeName);

        if (newMode != null)
        {
            SetCurrentMode(newMode);
        }
        else
        {
            Diglbug.LogError("Mode with name " + modeName + " not found!");
        }
    }
示例#7
0
 public Options()
 {
     Port            = 11000;
     ShowHelp        = false;
     Mode            = ModeName.Server;
     RawData         = false;
     Transport       = TransportName.Http;
     Protocol        = "http";
     Hostname        = "";
     Interval        = 5000;   // ms
     SleepPolling    = 600000; // ms  (10 minutes)
     MaxPollFailures = 200;    // times (wall clock is Interval * PollFailureMax ms)
 }
示例#8
0
    public void ClickHelpButton(ModeName modeName)
    {
        GameObject helpPopup = helpPopups[(int)modeName];

        Debug.Log($"MainMenuCtrl ::: helpPopup = {helpPopup.name}");

        // 다른 버튼 활성화/비활성화
        profileButton.enabled = helpPopup.activeSelf;
        optionButton.enabled  = helpPopup.activeSelf;

        // 메뉴 스와이프 잠금/해제
        swipeMenu.enabled  = helpPopup.activeSelf;
        scrollRect.enabled = helpPopup.activeSelf;
        scrollbar.value    = (int)modeName * 0.5f;

        // 같이하기 모드 안내창 초기화
        if (modeName == ModeName.TogetherMode)
        {
            mainMessage.isOn = true;
        }

        helpPopup.SetActive(!helpPopup.activeSelf);
    }
示例#9
0
        protected override void WriteConnectedState()
        {
            var BATTERY = String.Empty;

            switch (BatteryState.Level)
            {
            case BatteryLevel.Empty: BATTERY = "000%"; break;

            case BatteryLevel.Low: BATTERY = "033%"; break;

            case BatteryLevel.Medium: BATTERY = "066%"; break;

            case BatteryLevel.Full: BATTERY = "100%"; break;
            }

            var FPS        = RefreshRate.ToString("D3");
            var INPUT_LOCK = IsEnabled ? "OFF" : "ON ";
            var MODE       = (ModeName.Length > 3 ? ModeName.Substring(0, 3) : ModeName.PadLeft(3, ' ')).ToUpper();

            _view = $@"Xbox Controller connected.                                 
                                                           
 ■■■■■■ FPS: {FPS} | BAT: {BATTERY} | LOCK: {INPUT_LOCK} | MODE: {MODE} ■■■■■■
";
        }
示例#10
0
 public void SetMode(ModeName modeName)
 {
     PlayerPrefs.SetInt(oldModeKey, (int)modeName);
 }
示例#11
0
        protected override void WriteConnectedState()
        {
            var BATTERY = String.Empty; var BATTERY_______ = String.Empty;

            switch (BatteryState.Level)
            {
            case BatteryLevel.Empty: BATTERY = "000%"; BATTERY_______ = " 000%           "; break;

            case BatteryLevel.Low: BATTERY = "033%"; BATTERY_______ = " ■■ 033%        "; break;

            case BatteryLevel.Medium: BATTERY = "066%"; BATTERY_______ = " ■■■■■ 066%     "; break;

            case BatteryLevel.Full: BATTERY = "100%"; BATTERY_______ = " ■■■■■■■■■ 100% "; break;
            }

            var FPS        = RefreshRate.ToString("D3");
            var INPUT_LOCK = IsEnabled ? "OFF" : " ON";
            var MODE       = (ModeName.Length > 3 ? ModeName.Substring(0, 3) : ModeName.PadLeft(3, ' ')).ToUpper();

            var K = InputState.BackPressed ? "111" : "000";
            var S = InputState.StartPressed ? "111" : "000";

            var Q = InputState.LeftAnalogPressed ? "111" : "   ";
            var I = InputState.LeftAnalogX < Gamepad.MinAnalogDeadzone ? "111" : "000";
            var O = InputState.LeftAnalogX > Gamepad.MaxAnalogDeadzone ? "111" : "000";
            var P = InputState.LeftAnalogY < Gamepad.MinAnalogDeadzone ? "111" : "000";
            var M = InputState.LeftAnalogY > Gamepad.MaxAnalogDeadzone ? "111" : "000";

            var C = InputState.RightAnalogPressed ? "111" : "   ";
            var F = InputState.RightAnalogX < Gamepad.MinAnalogDeadzone ? "111" : "000";
            var G = InputState.RightAnalogX > Gamepad.MaxAnalogDeadzone ? "111" : "000";
            var H = InputState.RightAnalogY < Gamepad.MinAnalogDeadzone ? "111" : "000";
            var T = InputState.RightAnalogY > Gamepad.MaxAnalogDeadzone ? "111" : "000";

            var U = InputState.UpPressed ? "111" : "000";
            var D = InputState.DownPressed ? "111" : "000";
            var L = InputState.LeftPressed ? "111" : "000";
            var R = InputState.RightPressed ? "111" : "000";

            var A = InputState.APressed ? "111" : "000";
            var B = InputState.BPressed ? "111" : "000";
            var X = InputState.XPressed ? "111" : "000";
            var Y = InputState.YPressed ? "111" : "000";

            var LB______ = InputState.LBPressed ? "1111111111" : "0000000000";
            var RB______ = InputState.RBPressed ? "1111111111" : "0000000000";

            var LT   = InputState.LTPressed > 0 ? "1111" : "0000";
            var LT_  = InputState.LTPressed > 127 ? "11111" : "00000";
            var LT__ = InputState.LTPressed > 254 ? "111111" : "000000";
            var RT   = InputState.RTPressed > 0 ? "1111" : "0000";
            var RT_  = InputState.RTPressed > 127 ? "11111" : "00000";
            var RT__ = InputState.RTPressed > 254 ? "111111" : "000000";

            _view = $@"Xbox Controller connected.                                 
                                                           
        {LT}                                    {RT}       
       {LT_}         +{BATTERY_______}+         {RT_}      
      {LT__}                                    {RT__}     
                                                           
      {LB______}    _______      _______    {RB______}     
   /  {LB______}  \         0000         /  {RB______}  \  
  /                \       000000       /                \ 
 /       {M}        \ _____ 0000 _____ /        {Y}       \
       00{M}00                                  {Y}        
     {I} {Q} {O}       {K}        {S}       {X}     {B}    
     {I} {Q} {O}       {K}        {S}       {X}     {B}    
       00{P}00                                  {A}        
         {P}     {U}                    {T}     {A}        
                 {U}                  00{T}00              
             {L}     {R}            {F} {C} {G}            
             {L}     {R}            {F} {C} {G}            
                 {D}                  00{H}00              
                 {D}                    {H}                
                                                           
                                                           
 ■■■■■■ FPS: {FPS} | BAT: {BATTERY} | LOCK: {INPUT_LOCK} | MODE: {MODE} ■■■■■■
";
        }
示例#12
0
 public bool IsMatch(string modeName, bool isActivate)
 {
     return(ModeName.Equals(modeName) && IsActivate.Equals(isActivate));
 }