Ejemplo n.º 1
0
    private void GEngine(Vector3D output)
    {
        //TODO	六向重力控制
        foreach (IMyGravityGenerator GG in GGs)
        {
            switch (Directions[GG])
            {
            case Base6Directions.Direction.Forward:
                GG.SetValue("Gravity", Convert.ToSingle(output.Z));
                break;

            case Base6Directions.Direction.Backward:
                GG.SetValue("Gravity", Convert.ToSingle(-output.Z));
                break;

            case Base6Directions.Direction.Left:
                GG.SetValue("Gravity", Convert.ToSingle(output.X));
                break;

            case Base6Directions.Direction.Right:
                GG.SetValue("Gravity", Convert.ToSingle(-output.X));
                break;

            case Base6Directions.Direction.Down:
                GG.SetValue("Gravity", Convert.ToSingle(output.Y));
                break;

            case Base6Directions.Direction.Up:
                GG.SetValue("Gravity", Convert.ToSingle(-output.Y));
                break;
            }
        }
    }
Ejemplo n.º 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (dead_flg == 1)
        {
            return;
        }
        if (other.gameObject.tag == "TAG_ENEMY")
        {
            Instantiate(pf_baku, this.transform.position, Quaternion.identity);

            other.gameObject.SendMessage("damage", 1);
            GG.sound_play("SE_2");

            Destroy(this.gameObject);
        }

        if (other.gameObject.tag == "TAG_BLOCK")
        {
            GG.sound_play("SE_2");

            Instantiate(pf_baku, this.transform.position, Quaternion.identity);

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            using (var gg = new GG()) {
                gg.OnGetUsersList += (sender, users) => {
                    Console.WriteLine("USERS LIST RECIVED FOR CHANNEL {0}", users.channel_id);
                    Console.WriteLine("COUNT(users) = {0}", users.users_count);
                };

                gg.OnGetChannelsList += (sender, channels) => {
                    Console.WriteLine("CHANNELS LIST RECIVED");
                    Console.WriteLine("COUT(channels) = {0}", channels.channels.Count);

                    var channel = channels.channels.First();
                    Console.WriteLine("FIRST CHANNEL ID: {0}", channel.channel_id);
                };

                gg.OnMessageRecieved += (sender, message) => {
                    Console.WriteLine("MESSAGE {0}: {1}", message.user_name, message.text);
                };

                gg.Connect();
                //gg.GetChannelsList(0, 2);

                gg.GetUsersList(6147);
                gg.Join(6147);

                Console.ReadKey(true);

                gg.Unjoin(6147);
                Console.WriteLine("CLOSE CONNECTION");
            }

            Console.WriteLine(GG.GetChannelId("BSP"));
            Console.ReadKey(true);
        }
Ejemplo n.º 4
0
    void GameInit()
    {
        pause_button_set(true);
        pause_menu_set(false);
        GG.pause = 0;
        soundsound.OnPitchSliderChanged(0);
        howto_init();
        GO_ItemWindow.gameObject.SendMessage("window_item_set", -1);
        GG.window_item = 0;


        GG.minislime_z_cnt = 0.0f;
        GG.shield_z_cnt    = 0.0f;
        clear_out();
        GG.GameMode = GG.GAMEMODE_GAME;
        GG.item_cnt = 0;

        put_game_score();
        put_game_hiscore();
        put_text_stage();
        enemyset(GG.stage);
        GG.sound_play("BGM_GAME");

        float px = -3.28f;
        float py = -7.2f;

        for (int i = 0; i < 11; i++)
        {
            zikiset(px, py + UnityEngine.Random.Range(-0.08f, 0.08f));
            px += 0.64f;
        }
        howto_call();
    }
Ejemplo n.º 5
0
Archivo: 6.cs Proyecto: qifanyyy/CLCDSA
    public static void Main()
    {
        CM = new long[41, 41];
        for (int i = 0; i <= 40; i++)
        {
            for (int j = 0; j <= i; j++)
            {
                if (i == j)
                {
                    CM[i, j] = 1;
                }
                else if (j == 0)
                {
                    CM[i, j] = 1;
                }
                else
                {
                    CM[i, j] = CM[i - 1, j] + CM[i - 1, j - 1];
                }
            }
        }
        //  Console.WriteLine(CM[4, 2]);
        GG g = new GG();

        g.processing();
    }
Ejemplo n.º 6
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (dead_flg == 1)
        {
            return;
        }
        if (other.gameObject.tag == "TAG_ENEMY")
        {
            if (hitobj.Contains(other.gameObject))
            {
            }
            else
            {
                hitobj.Add(other.gameObject);

                Instantiate(pf_baku, this.transform.position, Quaternion.identity);

                other.gameObject.SendMessage("damage", 3);
                GG.sound_play("SE_1");
            }
        }

        if (other.gameObject.tag == "TAG_BLOCK")
        {
            GG.sound_play("SE_BAKU");

            Instantiate(pf_baku, other.transform.position, Quaternion.identity);

            Destroy(other.gameObject);
            Destroy(this.gameObject);
            dead_flg = 1;
        }
    }
Ejemplo n.º 7
0
 public void push_option_return()
 {
     GG.data_save();
     title_push_button = 1;
     image_option_base.gameObject.transform.DOLocalMove(new Vector3(0.0f, -2000.0f, 0.0f), 0.2f).SetEase(Ease.InOutQuart);
     soundsound.playsnd2("BGM_GAME", 1);
 }
Ejemplo n.º 8
0
    public static void Main(string[] args)
    {
        GoodBye g = new GoodBye();

        Console.WriteLine(g.bye() == "good bye");

        GG gg = new GG();

        Console.WriteLine(gg.bye() == "GG");

        GoodBye g1 = new GG();

        Console.WriteLine(g1.bye() == "good bye");

        GG ggg = new GGG();

        Console.WriteLine(ggg.bye() == "GG");

        GGG ggg2 = new GGG();

        Console.WriteLine(ggg2.bye() == "GGG");

        GoodBye g2 = new GGG();

        Console.WriteLine(g2.bye() == "good bye");

        GG gg2 = new GGG();

        Console.WriteLine(gg2.bye() == "GG");

        // GG gg3 = new GoodBye();               // 문법적으로 오류
    }
Ejemplo n.º 9
0
 public void DisableChams()
 {
     OutfitsPool.OutfitInstance _outfit = (OutfitsPool.OutfitInstance)GG.GetFieldValue(this.GetRemoteCharacter(), "_outfit");
     foreach (SkinnedMeshRenderer renderer in _outfit.ArmorMesh)
     {
         int        size = renderer.materials.Length;
         Material[] mats = new Material[size];
         for (int i = 0; i < size; i++)
         {
             mats[i] = GG.silBumpedDiffuseMat;
         }
         renderer.material        = armorMaterial;
         renderer.materials       = armorMaterials;
         renderer.sharedMaterial  = armorSharedMaterial;
         renderer.sharedMaterials = armorSharedMaterials;
     }
     foreach (SkinnedMeshRenderer renderer in _outfit.BodyMesh)
     {
         int        size = renderer.materials.Length;
         Material[] mats = new Material[size];
         for (int i = 0; i < size; i++)
         {
             mats[i] = GG.silBumpedDiffuseMat;
         }
         renderer.material        = bodyMaterial;
         renderer.materials       = bodyMaterials;
         renderer.sharedMaterial  = bodySharedMaterial;
         renderer.sharedMaterials = bodySharedMaterials;
     }
     this.chamsEnabled = false;
 }
Ejemplo n.º 10
0
    public void volume_slider_set()
    {
        float vol = slider_volume.value;

        GG.SoundVolume = vol;
        soundsound.volumeset(vol);
        GG.sound_play("SE_SWITCH1");
    }
Ejemplo n.º 11
0
    void game2visual()
    {
        soundsound.OnPitchSliderChanged(0);
        GG.sound_play("SE_WIN");
        game_obj_all_kill();

        clear_start();
    }
Ejemplo n.º 12
0
 void over_board_move_start_completed()
 {
     if (GG.score > GG.hiscore)
     {
         GG.hiscore = GG.score;
         GG.data_save();
     }
     score_ranking_start(GG.hiscore);
 }
Ejemplo n.º 13
0
    public void push_title_ranking()
    {
        if (title_push_button == 1)
        {
            GG.sound_play("SE_BUTTON");

            score_ranking_start(GG.hiscore);
        }
    }
Ejemplo n.º 14
0
 /// <summary>
 /// List of possible <see cref="GameVersion"/> values within the provided <see cref="generation"/>.
 /// </summary>
 /// <param name="generation">Generation to look within</param>
 /// <param name="pkVersion"></param>
 public static GameVersion[] GetVersionsInGeneration(int generation, int pkVersion)
 {
     if (GG.Contains(pkVersion))
     {
         return new[] { GO, GP, GE }
     }
     ;
     return(GameVersions.Where(z => z.GetGeneration() == generation).ToArray());
 }
Ejemplo n.º 15
0
 public void push_start_button()
 {
     //スタートボタン
     if (title_push_button == 1)
     {
         GG.sound_play("SE_START");
         title_push_button = 0;
         title_move_up();
     }
 }
Ejemplo n.º 16
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "TAG_ENESHOT")
        {
            GG.sound_play("SE_H");
            lifetime = 1;

            Destroy(other.gameObject);
        }
    }
Ejemplo n.º 17
0
 private void Awake()
 {
     DOTween.Init(false, true, LogBehaviour.ErrorsOnly);
     Application.targetFrameRate = 60;
     GG.first_read = 1;
     GG.stage      = 1;
     GG.data_load();
     sound_volume_set(GG.SoundVolume);
     TitleFirst();
     TitleInit();
 }
Ejemplo n.º 18
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (GG.GameMode != GG.GAMEMODE_GAME)
        {
            return;
        }
        if (damage_muteki_time > 0)
        {
            return;
        }

        if (dead_flg == 1)
        {
            return;
        }

        if ((other.gameObject.tag == "TAG_ENEMY") ||
            (other.gameObject.tag == "TAG_ENESHOT"))
        {
            GG.sound_play("SE_MISS");

            if (GG.debug_muteki_mode == 0)
            {
                HP--;
            }

            Destroy(other.gameObject);

            if (HP <= 0)
            {
                dead_flg = 1;

                GO_gameMgr.gameObject.SendMessage("alldeadcheck", 1);

                Destroy(this.gameObject);
            }
            else
            {
                damage_muteki_time = 60;
            }
        }

        if (other.gameObject.tag == "TAG_MOVEITEM")
        {
            int itemnum = other.GetComponent <MoveItem>().get_itemkind();
            shot_kind          = itemnum;
            shot_tokushu_timer = 120;
            other.GetComponent <MoveItem>().kieru();

            Instantiate(pf_Hikari_ItemGet, transform.position, Quaternion.identity);
            shot_timer = 60;
        }
    }
Ejemplo n.º 19
0
 public void push_title_left()
 {
     if (title_push_button != 1)
     {
         return;
     }
     if (GG.stage > 1)
     {
         GG.stage--;
         GG.sound_play("SE_SWITCH1");
         title_stage_put();
     }
 }
Ejemplo n.º 20
0
 public void push_title_right()
 {
     if (title_push_button != 1)
     {
         return;
     }
     if (GG.stage < GG.stage_max)
     {
         GG.stage++;
         GG.sound_play("SE_SWITCH1");
         title_stage_put();
     }
 }
Ejemplo n.º 21
0
        static void Main(string[] args)
        {
            var gg = new GG();

            var welcome = gg.Connect();

            while (!welcome.IsCompleted) {
                System.Threading.Thread.Sleep(1);
            }

            Console.WriteLine("GG say welcome!");
            Console.ReadLine();
        }
Ejemplo n.º 22
0
 public void push_clear_button_next()
 {
     GG.sound_play("SE_SWITCH1");
     GG.stage++;
     if (GG.stage == (GG.stage_max + 1))
     {
         GG.stage = 1;            //タイトルに戻ったときの表示に使うので1にする
         clear_out();
         boardstart();
     }
     else
     {
         GameInit();
     }
 }
Ejemplo n.º 23
0
        private static string GetResourceSuffix(GameVersion version, int index)
        {
            switch (version.GetGeneration())
            {
            case 8:
                return("swsh");

            case 7 when !GG.Contains(version):
                return("xy");

            case 6:
                return(ORAS.Contains(version) && index > 16 ? "ao" : "xy");

            case 5:
                return(B2W2.Contains(version) && index > 16 ? "b2w2" : "bw");

            case 4:
                if (index > 16)
                {
                    if (Pt == version)
                    {
                        return("pt");
                    }
                    if (HGSS.Contains(version))
                    {
                        return("hgss");
                    }
                }
                return("dp");

            case 3:
                if (E == version)
                {
                    return("e");
                }
                else if (FRLG.Contains(version) && index > 12)
                {
                    return("frlg");
                }
                else
                {
                    return("rs");
                }

            default:
                return(string.Empty);
            }
        }
Ejemplo n.º 24
0
 /// <summary>
 /// Gets the Generation the <see cref="GameVersion"/> belongs to.
 /// </summary>
 /// <param name="game">Game to retrieve the generation for</param>
 /// <returns>Generation ID</returns>
 public static int GetMaxSpeciesID(this GameVersion game)
 {
     if (Gen1.Contains(game))
     {
         return(Legal.MaxSpeciesID_1);
     }
     if (Gen2.Contains(game))
     {
         return(Legal.MaxSpeciesID_2);
     }
     if (Gen3.Contains(game))
     {
         return(Legal.MaxSpeciesID_3);
     }
     if (Gen4.Contains(game))
     {
         return(Legal.MaxSpeciesID_4);
     }
     if (Gen5.Contains(game))
     {
         return(Legal.MaxSpeciesID_5);
     }
     if (Gen6.Contains(game))
     {
         return(Legal.MaxSpeciesID_6);
     }
     if (Gen7.Contains(game))
     {
         if (SM.Contains(game))
         {
             return(Legal.MaxSpeciesID_7);
         }
         if (USUM.Contains(game))
         {
             return(Legal.MaxSpeciesID_7_USUM);
         }
         if (GG.Contains(game))
         {
             return(Legal.MaxSpeciesID_7b);
         }
         return(Legal.MaxSpeciesID_7_USUM);
     }
     return(-1);
 }
Ejemplo n.º 25
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (GG.pause == 1)
        {
            return;
        }


        if (damage_muteki_time > 0)
        {
            return;
        }

        GG.sound_play("SE_SWITCH1");

        if (GG.window_item != 0)
        {
            Vector3    pos   = GO_ItemWindow.gameObject.transform.position;
            GameObject getsc = (GameObject)Instantiate(pf_MoveItem, pos, Quaternion.identity);
            getsc.GetComponent <MoveItem>().set_start_goal(GG.window_item - 1, this.gameObject);

            GO_ItemWindow.gameObject.SendMessage("window_item_set", -1);

            GG.window_item = 0;
        }

        Vector3 shieldpos = transform.position;

        shieldpos.y     += 0.24f;
        shieldpos.z      = GG.shield_z_cnt;
        GG.shield_z_cnt += 0.001f;
        Instantiate(pf_shield, shieldpos, Quaternion.identity);
        shot_timer = 60;

        Instantiate(pf_tap_hikari, transform.position, Quaternion.identity);
    }
Ejemplo n.º 26
0
 /// <summary>
 /// Возращает (String) дату события гггг.мм.дд
 /// </summary>
 /// <returns></returns>
 public string DateString()
 {
     return(GG.ToString("0000") + "." + MM.ToString("00") + "." + DD.ToString("00"));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Возращает (String) дату и время события гггг.мм.дд.чч.мм.сс.мм.мм.нн
 /// </summary>
 /// <returns></returns>
 public string DateTimeString()
 {
     return(GG.ToString("0000") + "." + MM.ToString("00") + "." + DD.ToString("00") + "." + HH.ToString("00") + "." + Min.ToString("00") + "." + CC.ToString("00") + "." + Mil.ToString("00") + "." + ML.ToString("00") + "." + NN.ToString("00"));
 }
Ejemplo n.º 28
0
        /// <summary>
        /// Checks if the <see cref="g1"/> version (or subset versions) is equivalent to <see cref="g2"/>.
        /// </summary>
        /// <param name="g1">Version (set)</param>
        /// <param name="g2">Individual version</param>
        public static bool Contains(this GameVersion g1, GameVersion g2)
        {
            if (g1 == g2 || g1 == Any)
            {
                return(true);
            }

            switch (g1)
            {
            case RB:
                return(g2 == RD || g2 == BU || g2 == GN);

            case Stadium:
            case EventsGBGen1:
            case VCEvents:
            case RBY:
                return(RB.Contains(g2) || g2 == YW);

            case Gen1:
                return(RBY.Contains(g2) || g2 == Stadium || g2 == EventsGBGen1 || g2 == VCEvents);

            case GS: return(g2 == GD || g2 == SV);

            case Stadium2:
            case EventsGBGen2:
            case GSC:
                return(GS.Contains(g2) || g2 == C);

            case Gen2:
                return(GSC.Contains(g2) || g2 == Stadium2 || g2 == EventsGBGen2);

            case GBCartEraOnly:
                return(g2 == Stadium || g2 == Stadium2 || g2 == EventsGBGen1 || g2 == EventsGBGen2);

            case RS: return(g2 == R || g2 == S);

            case RSE:
                return(RS.Contains(g2) || g2 == E);

            case FRLG: return(g2 == FR || g2 == LG);

            case COLO:
            case XD: return(g2 == CXD);

            case CXD: return(g2 == COLO || g2 == XD);

            case RSBOX: return(RS.Contains(g2) || g2 == E || FRLG.Contains(g2));

            case Gen3:
                return(RSE.Contains(g2) || FRLG.Contains(g2) || CXD.Contains(g2) || g2 == RSBOX);

            case DP: return(g2 == D || g2 == P);

            case HGSS: return(g2 == HG || g2 == SS);

            case DPPt:
                return(DP.Contains(g2) || g2 == Pt);

            case BATREV: return(DP.Contains(g2) || g2 == Pt || HGSS.Contains(g2));

            case Gen4:
                return(DPPt.Contains(g2) || HGSS.Contains(g2) || g2 == BATREV);

            case BW: return(g2 == B || g2 == W);

            case B2W2: return(g2 == B2 || g2 == W2);

            case Gen5:
                return(BW.Contains(g2) || B2W2.Contains(g2));

            case XY: return(g2 == X || g2 == Y);

            case ORAS: return(g2 == OR || g2 == AS);

            case Gen6:
                return(XY.Contains(g2) || ORAS.Contains(g2));

            case SM:
                return(g2 == SN || g2 == MN);

            case USUM:
                return(g2 == US || g2 == UM);

            case GG:
                return(g2 == GP || g2 == GE || g2 == GO);

            case Gen7:
                return(SM.Contains(g2) || USUM.Contains(g2) || GG.Contains(g2));

            default: return(false);
            }
        }
Ejemplo n.º 29
0
        private void Button_Connect(object sender, RoutedEventArgs e)
        {
            var streamer = StreamerNameInput.Text;

            if (streamer == "")
            {
                MessageBox.Show("Введите имя стримера");
                return;
            }

            try {
                if (_userListUpdateTimer != null)
                {
                    _userListUpdateTimer.Dispose();
                }

                if (_xTimer != null)
                {
                    _xTimer.Stop();
                }

                var id = GG.GetChannelId(streamer);

                if (_manager != null)
                {
                    _manager.Dispose();
                }

                _manager = new ConnectionManager(id);
                BindingOperations.ClearBinding(usersListView, ListView.ItemsSourceProperty);
                var usersBind = new Binding();
                usersBind.Source = _manager.users;
                usersListView.SetBinding(ListView.ItemsSourceProperty, usersBind);

                BindingOperations.ClearBinding(chatControl, ListView.ItemsSourceProperty);
                var chatBind = new Binding();
                chatBind.Source = _manager.messages;
                chatControl.SetBinding(ListView.ItemsSourceProperty, chatBind);

                BindingOperations.ClearBinding(whiteUsersListView, ListView.ItemsSourceProperty);
                var premiumBind = new Binding();
                premiumBind.Source = _manager.WhiteList;
                whiteUsersListView.SetBinding(ListView.ItemsSourceProperty, premiumBind);

                //BindingOperations.ClearBinding(blackUsersListView, ListView.ItemsSourceProperty);
                //var blackListBind = new Binding();
                //blackListBind.Source = _manager.BlackList;
                //blackUsersListView.SetBinding(ListView.ItemsSourceProperty, blackListBind);

                BindingOperations.ClearBinding(forRandowUsersListView, ListView.ItemsSourceProperty);
                var forRandomBind = new Binding();
                forRandomBind.Source = _manager.ForRandom;
                forRandowUsersListView.SetBinding(ListView.ItemsSourceProperty, forRandomBind);

                cb_pem.UserList    = (FilteredList <User>)_manager.WhiteList;
                cb_nonpem.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat0.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat1.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat2.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat3.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat4.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_donat5.UserList = (FilteredList <User>)_manager.WhiteList;
                cb_mod.UserList    = (FilteredList <User>)_manager.WhiteList;

                _userListUpdateTimer          = new Timer();
                _userListUpdateTimer.Interval = 5000;
                _userListUpdateTimer.Elapsed += new ElapsedEventHandler(OnUpdateUserList);
                _userListUpdateTimer.Enabled  = true;

                _xTimer.Start();
            } catch (Exception) {
                MessageBox.Show("Что-то пошло не так. Найдите последовательность действий, приводящих к этому сообщению и отправьте её на [email protected]");
            }
        }
Ejemplo n.º 30
0
    public static void Main()
    {
        GG g = new GG();

        g.processing();
    }
Ejemplo n.º 31
0
				public static void Main ()
				{
					System.DateTime dt = new GG ();
				}
Ejemplo n.º 32
0
 public static void SetHelper(GT a, GG b)
 {
     gText   = a;
     gGlobal = b;
 }