コード例 #1
0
    private void UpdateDriveHelpContent()
    {
        string content = PELocalization.GetString(82201084);

        if (string.IsNullOrEmpty(content))
        {
            return;
        }

        content = content.Replace("$W$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MoveForward).ToString());
        content = content.Replace("$S$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MoveBackward).ToString());
        content = content.Replace("$A$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MoveLeft).ToString());
        content = content.Replace("$D$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MoveRight).ToString());

        content = content.Replace("$E$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.InteractWithItem).ToString());
        content = content.Replace("$L$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.SwitchLight).ToString());
        content = content.Replace("$F$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.Vehicle_AttackModeOnOff).ToString());

        content = content.Replace("$Space$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.Vehicle_LiftUp).ToString());
        content = content.Replace("$Alt$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.Vehicle_LiftDown).ToString());

        content = content.Replace("$F1$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.VehicleWeaponGrp1).ToString());
        content = content.Replace("$F2$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.VehicleWeaponGrp2).ToString());
        content = content.Replace("$F3$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.VehicleWeaponGrp3).ToString());
        content = content.Replace("$F4$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.VehicleWeaponGrp4).ToString());

        content = content.Replace("$Shift$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.Vehicle_Sprint).ToString());

        content = content.Replace("$Z$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MissleTarget).ToString());
        content = content.Replace("$X$", PeInput.GetKeyCodeByLogicFunKey(PeInput.LogicFunction.MissleLaunch).ToString());

        driveHelpLbl.text = content;
        driveHelpLbl.MakePixelPerfect();
    }