Exemplo n.º 1
0
    // Connects to photon
    void Start()
    {
        instance = this;
        PhotonNetwork.CrcCheckEnabled = true;
        ReplayUtils.Init();

        this.chatScroll = this.chatPanel.transform.Find("ChatScroll").GetComponent <ScrollRect> ();

        // Checks if it is already connected
        if (PhotonNetwork.connected)
        {
            OnReceivedRoomListUpdate();
            ActivePanel(PanelType.Match);
            return;
        }

        ActivePanel(PanelType.Nick);
    }
Exemplo n.º 2
0
    // Connects to photon
    void Start()
    {
        instance = this;
        PhotonNetwork.CrcCheckEnabled = true;
        ReplayUtils.Init();

        this.chatScroll = this.chatPanel.transform.Find("ChatScroll").GetComponent <ScrollRect> ();

        // Checks if it is already connected
        if (PhotonNetwork.connected)
        {
            OnReceivedRoomListUpdate();
            ActivePanel(PanelType.Match);
            return;
        }

        // tutorial data initialization
        tut_topics       = new Button[] { tutindex_game, tutindex_move, tutindex_buster, tutindex_navpower, tutindex_chips, tutindex_combo, tutindex_terrain };
        text_array       = new string[tut_topics.Length][];
        text_array[0]    = new string[3];       // game screen
        text_array[0][0] = "This is the main battle screen. 2 players do battle on this 6x3 grid and attempt to reduce their opponent's HP to 0 using a variety of attacks and abilities.";
        text_array[0][1] = "This display (found at the top of the screen) presents a lot of information about a player's character. The image represents what character the player is using, their remaining HP is displayed in front of the character's face, and the number behind the character's face shows how many chips they are holding.";
        text_array[0][2] = "The bar at the bottom of this display is the 'Custom Gauge' which shows how much energy is available for activating chips and abilities.";
        text_array[1]    = new string[2];       // movement
        text_array[1][0] = "Characters can only move within their own territory (designated by blue and red borders), and cannot move across broken panels (unless aided by certain abilites).";
        text_array[1][1] = "The movement pad (in the bottom left corner of the screen) may be set to 'tap' or 'swipe'. Swipe in one of 4 directions, or tap 1 of 4 directional buttons to move your character.";
        text_array[2]    = new string[4];      // buster
        text_array[2][0] = "Every character has a buster which can be fired by tapping the button in the bottom right corner of the screen. The buster fires a straight shot for 1 damage, but can be upgraded by some abilites.";
        text_array[2][1] = "The buster can be charged up to 3 levels. The ring around the buster button will fill as you approach full charge, and up to 3 star icons will appear above it to show your current level of charge.";
        text_array[2][2] = "A spinning ball of energy will appear over a character that is charging their buster, and it will change color to reflect the level of charge that character has reached.";
        text_array[2][3] = "Each character has their own unique charged buster attacks. Megaman's fires just like a normal buster shot, but does higher damage and staggers opponents (*Megaman is currently the only playable character).";
        text_array[3]    = new string[3];       // Navi Power
        text_array[3][0] = "The button above the Buster Button activates a character's unique 'Navi Power'. This power often comes at the cost of some energy from your 'Custom Gauge'.";
        text_array[3][1] = "Megaman's ability 'Weapon Get' will be unusable at the start of a game and appear as 'No Data' until your opponent activates a Battlechip.";
        text_array[3][2] = "Once your opponent uses a Battlechip, Megaman will be able to spend 3 Custom Energy to activate 'Weapon Get', adding a copy of the last Battlechip used by your opponent to your hand with a white chip code (more on color codes in 'Chip Combos').";
        text_array[4]    = new string[5];      //battlechips
        text_array[4][0] = "Along the bottom of your screen is your hand of Battlechips. Battlechips provide access to a wide variety of attacks and effects in exchange for Custom energy. You start each game with 3 chips, but can draw more at any time with the 'Add Chip' button for 2 energy.";
        text_array[4][1] = "Battlechips can be recognized by their image and name. The icon in the top right shows how much Custom Energy a chip needs to activate, as well as its color code (more on color codes and what they mean in the 'Chip Combos' section).";
        text_array[4][2] = "At the bottom left of a Battlechip you can see its element and a number representing its power. This number shows how much damage or healing a chip will do, or sometimes represents the potency or duration of its effect.";
        text_array[4][3] = "You can activate any chip from your hand by clicking on it, so long as you have enough energy in your Custom Gauge.";
        text_array[4][4] = "Some chips (Such as Barrier), apply a temporary effect to your character. The 'Active Chip Display' in the top corners of the screen show when a chip's effect is active, and how much longer it will last. Activating another chip with a lasting effect will replace any currently active chips displayed here.";
        text_array[5]    = new string[5];      //chip combos
        text_array[5][0] = "The cost display on a Battlechip can be 1 of 8 different colors, as well as white and grey. This color represents the chip's color code. When chips with the same color code are activated consecutively, you activate a color combo.";
        text_array[5][1] = "Color combos reduce the activation cost of same-colored chips in your hand. If you activate a Battlechip, then follow it up with another chip of the same color, the second chip will cost 1 less than it normally would.";
        text_array[5][2] = "You can recognize that a color combo is active when a Battlechip's cost icon has a bold outline. Color combos can be extended by activating more chips of the same color. When you activate a chip of another color, your old combo ends, and a new one can start.";
        text_array[5][3] = "Chips with white and grey color codes interact with combos in special ways. White code chips cannot combo with each other, but can be activated in the middle of another color combo without interrupting or resetting it.";
        text_array[5][4] = "Grey code chips also cannot combo with each other, but they will interrupt active color combos. The 'Add Chip' button, as well as some Navi Powers will also interrupt color combos.";
        text_array[6]    = new string[3];      //terrain
        text_array[6][0] = "At the start of every game, all 18 tiles that make up the playing field will be plain, but a variety of effects can be applied to these tiles through the use of certain abilities.";
        text_array[6][1] = "You cannot stand on broken tiles, and certain attacks will be stopped by them. If you step on a cracked tile, it will break when you step off of it. Broken tiles automatically repair themselves after a short time.";
        text_array[6][2] = "Standing on a volcano, water, or grass tile will affect the power of certain elemental attacks that you use and that hit you. Standing on a poison tile will slowly damage you, ice tiles will cause you to continue sliding when you step on one, and sanctuary tiles will slowly heal you.";

        // If the player specified a username already, load it.
        if (PlayerPrefs.HasKey("Nick"))
        {
            nickname       = PlayerPrefs.GetString("Nick");
            nickInput.text = PlayerPrefs.GetString("Nick");
        }
        if (!PlayerPrefs.HasKey("Nick"))
        {
            nickInput.text = "Player";
        }
        // If the player asked previously to skip this, skip it. Otherwise, show nickname screen.
        // Sets values on the main and nick screens.
        int dontAnnoyMe = PlayerPrefs.GetInt("DontAnnoyMe", 0);

        if (dontAnnoyMe == 1)
        {
            dontAnnoyMeToggle.isOn = true;
            nickWelcomeText.text   = "Welcome " + nickname;
            ActivePanel(PanelType.Main);
        }
        if (dontAnnoyMe == 0)
        {
            dontAnnoyMeToggle.isOn = false;
            ActivePanel(PanelType.Nick);
        }
    }