Пример #1
0
    private void SetupCharacter()
    {
        SaveData sd = PD.GetSaveData();

        PD.p2Char = (PersistData.C)sd.GetTitleScreenCharacter();
        int winOffset = PD.GetPlayerSpriteStartIdx(PD.p2Char) * 3 + sd.getPlayerWinType(PD.GetPlayerSpritePath(PD.p2Char));

        if (PD.p2Char == PersistData.C.White)
        {
            winOffset = 30;
        }
        else if (PD.p2Char == PersistData.C.September)
        {
            winOffset = 31;
        }
        Sprite[] sheet   = Resources.LoadAll <Sprite>(SpritePaths.CharFullShots);
        bool     onRight = System.Array.IndexOf(new int[] { 0, 3, 4, 7, 11, 13, 15, 16, 17, 19, 20, 22, 23, 24, 27, 29, 31 }, winOffset) >= 0;
        float    xOffset = onRight?2.5f:-2.5f;

        if (PD.p2Char != PersistData.C.Null)
        {
            PD.sounds.SetVoiceAndPlay(SoundPaths.VoicePath + PD.GetPlayerSpritePath(PD.p2Char) + "/" + "083", 0);
            character  = GetGameObject(new Vector3(xOffset, -0.5f), "A Player Is You", sheet[winOffset], true, "Zapper");
            charTalker = new CutsceneChar(PD.GetPlayerSpritePath(PD.p2Char), character, null, 0, PD);
            if (PD.p2Char != PersistData.C.September && PD.p2Char != PersistData.C.White)
            {
                PD.sounds.SetMusicAndPlay(SoundPaths.M_Title_DerivPath + PD.GetPlayerSpritePath(PD.p2Char));
            }
            else
            {
                PD.sounds.SetMusicAndPlay(SoundPaths.M_Title_DerivPath + "White");
                if (PD.p2Char == PersistData.C.September)
                {
                    PD.sounds.SetVoiceAndPlay(SoundPaths.VoicePath + "September/042", 0);
                }
                else
                {
                    PD.sounds.SetVoiceAndPlay(SoundPaths.VoicePath + "White/032", 0);
                }
            }
        }
        else
        {
            PD.sounds.SetVoiceAndPlay(SoundPaths.NarratorPath + "001", 0);
            PD.sounds.SetMusicAndPlay(SoundPaths.M_Title_Default);
        }
    }
Пример #2
0
 protected Sprite GetOverlaySprite()
 {
     return(Resources.LoadAll <Sprite>(SpritePaths.TileOverlay)[PD.GetPlayerSpriteStartIdx(player == 1?PD.p1Char:PD.p2Char)]);
 }