コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Doom_Shroom_St = GetComponent <Doom_Shroom_State>();
        Doom_Shroom_An = GetComponent <Doom_Shroom_Animation>();
        HUD            = Doom_Shroom_St.HUD;
        switch (Global_Variable.Difficulty_Level)
        {
        case 2:
            Max_Health = Health_Hard;
            break;

        case 1:
            Max_Health = Health_Normal;
            break;

        default:
            Max_Health = Health_Easy;
            break;
        }
        Current_Health = Max_Health;
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        // Switch Doom Shroom Delay Speed accordingly to the global difficulty
        switch (Global_Variable.Difficulty_Level)
        {
        case 2:
            Current_Jump_Delay = Hard_Jump_Delay;
            break;

        case 1:
            Current_Jump_Delay = Normal_Jump_Delay;
            break;

        default:
            Current_Jump_Delay = Easy_Jump_Delay;
            break;
        }
        Hit_Box        = GetComponent <BoxCollider2D>();
        Doom_Shroom_RB = GetComponent <Rigidbody2D>();
        Doom_Shroom_An = GetComponent <Doom_Shroom_Animation>();
        Doom_Shroom_St = GetComponent <Doom_Shroom_State>();
    }