Exemple #1
0
    //プレイヤー設置
    private static void SummonPlayer(int key)
    {
        playerPosition = new Vector2(2, 1);
        int[] size = ReadWrite.CalcField();
        int   id   = 0;

        for (int i = 0; i < size[0]; i++)
        {
            for (int j = 0; j < size[1]; j++)
            {
                int point = ReadWrite.PointPanel(i, j);
                if (point == 4)
                {
                    playerPosition = new Vector2(i, j);
                    break;
                }
            }
        }
        Vector3 vec = Parameter.Calc3DFloorToVec3(playerPosition);

        player = (GameObject)Instantiate(prePlayer, vec, Quaternion.identity);
        player.transform.localScale = Parameter.localMagnification;
        player.name     = "Player";
        playerParameter = ReadWrite.GetPlayerParameter(key);
        playerStatus    = MakeStatus(playerParameter);
    }