예제 #1
0
    [SerializeField] private PieceList pieceList;               // ピース情報

    // Use this for initialization
    void Start()
    {
        EnemyParty = new DEFINE.Party(
            new DEFINE.Character(100, 10, DEFINE.PUZZLE_PIECE_SUIT.SPADE, DEFINE.PUZZLE_PIECE_SUIT.SPADE),                    // リーダー
            new DEFINE.Character(100, 10, DEFINE.PUZZLE_PIECE_SUIT.DIAMOND, DEFINE.PUZZLE_PIECE_SUIT.DIAMOND),                // キャラ1(アイコン 左)
            new DEFINE.Character(100, 10, DEFINE.PUZZLE_PIECE_SUIT.HEART, DEFINE.PUZZLE_PIECE_SUIT.HEART),                    // キャラ2(アイコン 中)
            new DEFINE.Character(100, 10, DEFINE.PUZZLE_PIECE_SUIT.CLUB, DEFINE.PUZZLE_PIECE_SUIT.CLUB));                     // キャラ3(アイコン 右)

        // パーティのライフを設定
        PartyLife   = EnemyParty.Chara_0.Life + EnemyParty.Chara_1.Life + EnemyParty.Chara_2.Life + EnemyParty.Chara_3.Life;
        PartyAttack = EnemyParty.Chara_0.Attack + EnemyParty.Chara_1.Attack + EnemyParty.Chara_2.Attack + EnemyParty.Chara_3.Attack;

        // 体力ゲージを設定
        lifeGauge.SetGaugeMax(PartyLife);
        lifeGauge.SetGaugeValue(PartyLife);
    }
예제 #2
0
    // スキルが発動しているかチェック
    public bool[] SkillCheckList(DEFINE.Party party, PieceList pieceList)
    {
        // スキル発動フラグ
        bool[] SkillFlag = { false, false, false, false };

        // リストに入っているスート
        List <DEFINE.PUZZLE_PIECE_SUIT> SuitList = new List <DEFINE.PUZZLE_PIECE_SUIT>();

        // パズルリストの情報を取得
        List <GameObject> list = pieceList.GetRemovaleList();

        // スート情報をリストに格納
        for (int Cnt = 0; Cnt < list.Count; Cnt++)
        {
            SuitList.Add(list[Cnt].GetComponent <PuzzlePiece>().GetSuit());
        }

        // スキルを比較
        for (int Cnt = 0; Cnt < SuitList.Count - 1; Cnt++)
        {
            // リーダー
            if (party.Chara_0.Skill1 == SuitList[Cnt])
            {
                if (party.Chara_0.Skill2 == SuitList[Cnt + 1])
                {
                    SkillFlag[0] = true;
                }
            }

            // キャラ1
            if (party.Chara_1.Skill1 == SuitList[Cnt])
            {
                if (party.Chara_1.Skill2 == SuitList[Cnt + 1])
                {
                    SkillFlag[1] = true;
                }
            }

            // キャラ2
            if (party.Chara_2.Skill1 == SuitList[Cnt])
            {
                if (party.Chara_2.Skill2 == SuitList[Cnt + 1])
                {
                    SkillFlag[2] = true;
                }
            }

            // キャラ3
            if (party.Chara_3.Skill1 == SuitList[Cnt])
            {
                if (party.Chara_3.Skill2 == SuitList[Cnt + 1])
                {
                    SkillFlag[3] = true;
                }
            }
        }

        // ピースのリストを初期化
        pieceList.ListInit();

        return(SkillFlag);
    }
예제 #3
0
    private bool[] skillFlag = { false, false, false, false }; // スキルが発動しているか

    // Use this for initialization
    void Start()
    {
        // パーティの情報を取得
        if (player != null)
        {
            party = player.GetPlayerParty();
        }
        else if (enemy != null)
        {
            party = enemy.GetEnemyParty();
        }

        // リーダー
        switch (party.Chara_0.Skill1)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[0].sprite = sprite[0];
            image[1].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[0].sprite = sprite[2];
            image[1].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[0].sprite = sprite[4];
            image[1].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[0].sprite = sprite[6];
            image[1].sprite = sprite[7];
            break;
        }

        switch (party.Chara_0.Skill2)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[2].sprite = sprite[0];
            image[3].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[2].sprite = sprite[2];
            image[3].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[2].sprite = sprite[4];
            image[3].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[2].sprite = sprite[6];
            image[3].sprite = sprite[7];
            break;
        }

        // キャラ1
        switch (party.Chara_1.Skill1)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[4].sprite = sprite[0];
            image[5].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[4].sprite = sprite[2];
            image[5].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[4].sprite = sprite[4];
            image[5].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[4].sprite = sprite[6];
            image[5].sprite = sprite[7];
            break;
        }

        switch (party.Chara_1.Skill2)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[6].sprite = sprite[0];
            image[7].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[6].sprite = sprite[2];
            image[7].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[6].sprite = sprite[4];
            image[7].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[6].sprite = sprite[6];
            image[7].sprite = sprite[7];
            break;
        }

        // キャラ2
        switch (party.Chara_2.Skill1)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[8].sprite = sprite[0];
            image[9].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[8].sprite = sprite[2];
            image[9].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[8].sprite = sprite[4];
            image[9].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[8].sprite = sprite[6];
            image[9].sprite = sprite[7];
            break;
        }

        switch (party.Chara_2.Skill2)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[10].sprite = sprite[0];
            image[11].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[10].sprite = sprite[2];
            image[11].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[10].sprite = sprite[4];
            image[11].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[10].sprite = sprite[6];
            image[11].sprite = sprite[7];
            break;
        }

        // キャラ3
        switch (party.Chara_3.Skill1)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[12].sprite = sprite[0];
            image[13].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[12].sprite = sprite[2];
            image[13].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[12].sprite = sprite[4];
            image[13].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[12].sprite = sprite[6];
            image[13].sprite = sprite[7];
            break;
        }

        switch (party.Chara_3.Skill2)
        {
        case DEFINE.PUZZLE_PIECE_SUIT.SPADE:
            image[14].sprite = sprite[0];
            image[15].sprite = sprite[1];

            break;

        case DEFINE.PUZZLE_PIECE_SUIT.DIAMOND:
            image[14].sprite = sprite[2];
            image[15].sprite = sprite[3];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.HEART:
            image[14].sprite = sprite[4];
            image[15].sprite = sprite[5];
            break;

        case DEFINE.PUZZLE_PIECE_SUIT.CLUB:
            image[14].sprite = sprite[6];
            image[15].sprite = sprite[7];
            break;
        }

        // パズルの色を初期化
        for (int Cnt = 1; Cnt < image.Length; Cnt += 2)
        {
            image[Cnt].color = Low;
        }
    }